I have a cluster of machines (LAN) set up for password-less SSH login for running code in parallel. No problems with the SSH or functionality, however...
I'm trying to set up an sftp-only (no shell) user on the gateway machine for external (outside the cluster) file transfers to the gateway machine. I created a new group and user following the guide here (http://blog.swiftbyte.com/linux/allowing-sftp-access-while-chrooting-the-user-and-denying-shell-access/), and edited the
/etc/ssh/sshd_config file as appropriate. However, when I restart the ssh server, the gateway machine is no longer accessible through SSH or SFTP. Any attempt is met with a "connection refused" message. If I switch back to the original sshd_config file, I can connect again.
Is there any known issue with setting
Subsystem sftp internal-sftp that causes SSH functionality to disappear? Or any suggestions for something I might be missing?
My sshd_config file addition is as follows:
Subsystem sftp internal-sftp Match Group sftponly ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
My sftp-user has their home directory specified on an external drive that is auto-mounted at boot. Their home directory has root ownership and 755 permission.
Match Groupblock of code must be inserted at the end of the sshd_config file. Many guides don't explicitly state this and so I overlooked it and thought the code belonged together with the
Subsystemline. SSH works fine again; SFTP, however, still isn't connecting (giving a "broken pipe" error).