Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: SFTP jails for dummies
PostPosted: Sat Feb 26, 2011 2:58 am 
Offline
Senior Member

Joined: Sat Feb 12, 2011 10:09 pm
Posts: 64
i.e the dummy would be me!

I have been working my way through this and its driving me nuts as so much is assumed: http://library.linode.com/security/sftp-jails/

Did the file changes.

I have a user 'dave' and dave is part of the group 'filetransfer', this is all fine.

usermod -G filetransfer dave
chown root:root /srv/www/website_name.com
chmod 755 /srv/www/website_name.com

Next bit
cd /srv/www/website_name.com
mkdir docs public_html <------- skipped this as I already have one
chown username:usergroup

The chown username:usergroup <---- does this mean I have to put chown dave:filetransfer ? (I did try it and had no luck)


So after all that I use the SFTP on cyberduck - am I gathering that the server is the linode IP address, username is dave and the password the one for that account. It just disconnects me..

any ideas?


Last edited by crazyfruitbat on Sat Feb 26, 2011 9:00 pm, edited 1 time in total.

Top
   
PostPosted: Sat Feb 26, 2011 6:25 pm 
Offline
Senior Member

Joined: Wed Oct 20, 2004 8:55 am
Posts: 120
crazyfruitbat wrote:
usermod -G filetransfer dave
chown username:usergroup
The chown username:usergroup <---- does this mean I have to

I'm guessing in this case it would be dave:dave


Top
   
PostPosted: Sat Feb 26, 2011 8:59 pm 
Offline
Senior Member

Joined: Sat Feb 12, 2011 10:09 pm
Posts: 64
kangaby wrote:
crazyfruitbat wrote:
usermod -G filetransfer dave
chown username:usergroup
The chown username:usergroup <---- does this mean I have to

I'm guessing in this case it would be dave:dave


Cheers but that isn't working either. it just disconnects - I have tried this so many times now...


Top
   
 Post subject:
PostPosted: Sat Feb 26, 2011 9:46 pm 
Offline
Senior Member

Joined: Wed Oct 20, 2010 12:11 pm
Posts: 142
Try looking in your /var/log/auth.log - openssh should display why it denies a connection.


Top
   
 Post subject:
PostPosted: Sat Feb 26, 2011 10:35 pm 
Offline
Senior Member

Joined: Sat Feb 12, 2011 10:09 pm
Posts: 64
Wow - lots of logs in that!

Code:
Feb 27 10:53:33 server sshd[2167]: Accepted password for root from xxx.xx.xxx.xxx port 60646 ssh2
Feb 27 10:53:33 server sshd[2167]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Feb 27 10:53:33 server sshd[2167]: pam_unix(sshd:session): session opened for user root by (uid=0)
Feb 27 10:53:33 server sshd[2167]: subsystem request for sftp
Feb 27 10:53:33 server sshd[2179]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Feb 27 10:56:13 server sshd[2188]: Accepted password for root from xxx.xx.xxx.xxx port 60693 ssh2
Feb 27 10:56:13 server sshd[2188]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Feb 27 10:56:13 server sshd[2188]: pam_unix(sshd:session): session opened for user root by (uid=0)
Feb 27 10:56:13 server sshd[2188]: subsystem request for sftp
Feb 27 10:56:13 server sshd[2200]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Feb 27 10:56:17 server sshd[2188]: Received disconnect from xxx.xx.xxx.xxx: 11: Closed due to user request.
Feb 27 10:56:17 server sshd[2188]: pam_unix(sshd:session): session closed for user root
Feb 27 10:56:17 server sshd[2188]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Feb 27 11:06:27 server sshd[2240]: Accepted password for root from xxx.xx.xxx.xxx port 60880 ssh2
Feb 27 11:06:27 server sshd[2240]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory
Feb 27 11:06:27 server sshd[2240]: pam_unix(sshd:session): session opened for user root by (uid=0)
Feb 27 11:06:27 server sshd[2240]: subsystem request for sftp
Feb 27 11:06:27 server sshd[2253]: pam_env(sshd:setcred): Unable to open env file: /etc/default/locale: No such file or directory


This was just a small part.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group