Posted April 9, 201410 yr Hi All, Im trying to setup a new user on a RHEL 6 box for purely sftp access. At the moment I have full access via the root account and can sftp with applciations like winscp fine. these are the steps I followed to create a new user for sftp on hostname:linuxserver1 1) groupadd sftpusers 2) added the following to /etc/sshd_config #Match Group sftpusergroup #ChrootDirectory %h #ForceCommand internal-sftp 3) Restarted sshd - /etc/init.d/sshd restart 4) useradd -s /bin/false -G sftpusers testaccount1 5)passwd testaccount1 (Set password) 6)chown root ~testaccount1 7)chmod 750 ~testaccount1 When I try and SFTP to this box from another Linux server with testaccount1@linuxserver1 it then asks for password I enter the password and then it says connection closed straight away also when I try with WINSCP with the credentials it comes up with Cannot initialize SFTP protocol. Is the host running a SFTP server? Any ideas? Am I missing some commands? any help will be appreciated Continue reading...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.