Linode Forum Index Linode Forum
Linode Community Forums
 


SFTP jails for dummies

Click here to go to the original topic

 
       Linode Forum Index -> Linux Tips, Tricks, Tutorials
Author Message
crazyfruitbat



Joined: 12 Feb 2011
Posts: 55

Posted: Sat Feb 26, 2011 1:58 am    Post subject: SFTP jails for dummies  

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?
Back to top  
kangaby



Joined: 20 Oct 2004
Posts: 99

Posted: Sat Feb 26, 2011 5:25 pm    Post subject: Re: SFTP jails for dummies  

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
Back to top  
crazyfruitbat



Joined: 12 Feb 2011
Posts: 55

Posted: Sat Feb 26, 2011 7:59 pm    Post subject: Re: SFTP jails for dummies  

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...
Back to top  
derfy



Joined: 20 Oct 2010
Posts: 68

Posted: Sat Feb 26, 2011 8:46 pm    Post subject:  

Try looking in your /var/log/auth.log - openssh should display why it denies a connection.
Back to top  
crazyfruitbat



Joined: 12 Feb 2011
Posts: 55

Posted: Sat Feb 26, 2011 9:35 pm    Post subject:  

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.
Back to top  
 
       Linode Forum Index -> Linux Tips, Tricks, Tutorials
Page 1 of 1