| Linode Forum https://forum.linode.com/ |
|
| SFTP Jails - OpenSSH - Software caused connection abort https://forum.linode.com/viewtopic.php?f=19&t=6835 |
Page 1 of 1 |
| Author: | delibar [ Wed Mar 16, 2011 3:21 pm ] |
| Post subject: | SFTP Jails - OpenSSH - Software caused connection abort |
Hello. I recently followed this guide: http://library.linode.com/security/sftp-jails/ in order to prevent some FTP users from seeing directories above in hierarchy from their default homes. I followed all of the steps involved, but I am now getting: "Error: Network error: Software caused connection abort Error: Could not connect to server" This occurs upon trying to connect with SFTP using FileZilla. What are some steps to fix this issue and is there something I might have missed in the setup process? I am using Ubuntu 10.10 Maverick. Thank you! |
|
| Author: | obs [ Wed Mar 16, 2011 4:08 pm ] |
| Post subject: | |
At a guess I'd say you missed this part Code: usermod -G filetransfer username It's what most people miss. If you set the log level to DEBUG in /etc/ssh/sshd_config and restart ssh then try connecting again, check /var/log/auth.log for debugging info which may give more information. |
|
| Author: | delibar [ Wed Mar 16, 2011 4:31 pm ] |
| Post subject: | |
I did that, actually. Anyway, here is what I just did: Code: root@snarf:~# usermod -G filetransfer nginxftp Looks bad to me! XD Anyway, in the log you just provided, this is what just occurred: Code: Mar 16 16:30:47 snarf sshd[18636]: pam_unix(sshd:session): session opened for user <USERHERE> by (uid=0) |
|
| Author: | obs [ Wed Mar 16, 2011 4:39 pm ] |
| Post subject: | |
You restart ssh by using Code: service ssh restart You also shouldn't have changed permissions on /etc/ssh/sshd_config so run Code: chmod 0644 /etc/ssh/sshd_config |
|
| Author: | delibar [ Wed Mar 16, 2011 4:50 pm ] |
| Post subject: | |
Oh, alright, thanks! Okay so still an issue. Same debug message: Code: Mar 16 16:44:51 snarf sshd[18703]: debug1: Forked child 18718. |
|
| Author: | obs [ Wed Mar 16, 2011 5:38 pm ] |
| Post subject: | |
Sounds like this bit is wrong Code: Match group filetransfer Either that or your user's home directory is set to /home/ instead of /home/<username> What's the content of your /etc/ssh/sshd_config file? |
|
| Author: | delibar [ Wed Mar 16, 2011 5:47 pm ] |
| Post subject: | |
I had Code: Match group filetransfer or something like that. I changed it back to what you have, but still no changes. Still same debug error. I also just re-set the home directory and no changes were made. |
|
| Author: | obs [ Wed Mar 16, 2011 7:09 pm ] |
| Post subject: | |
did you run Code: service ssh restartafter changing sshd_config? What does Code: ls -lhd /homeoutput. |
|
| Author: | delibar [ Wed Mar 16, 2011 7:14 pm ] |
| Post subject: | |
Yes. And: Code: drwxrwxrwx 6 root root 4.0K Mar 10 15:43 /home |
|
| Author: | hoopycat [ Wed Mar 16, 2011 8:03 pm ] |
| Post subject: | |
!!!! Try "chmod 755 /home" ... you've got it set world-writable, which will (correctly) freak sshd out. |
|
| Author: | delibar [ Wed Mar 16, 2011 9:02 pm ] |
| Post subject: | |
That fixed it Thank you very much!! |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|