create sftp account
Dears
i create sftp account toward one directory see below:
[root@NACAPP1S ~]# groupadd sftpusers [root@NACAPP1S ~]# useradd -g sftpusers -d /conf -s /sbin/nologin mtsftp [root@NACAPP1S ~]# [root@NACAPP1S ~]# passwd mtsftp Changing password for user mtsftp. New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: passwd: all authentication tokens updated successfully. [root@NACAPP1S ~]# [root@NACAPP1S ~]# [root@NACAPP1S ~]# grep mtsftp /etc//passwd mtsftp:x:500:500::/conf:/sbin/nologin [root@NACAPP1S ~]# i added this lines to /etc/ssh/sshd_config Subsystem sftp internal-sftp Match Group sftpusers ChrootDirectory /opt/na/%u ForceCommand internal-sftp i put comment out to #Subsystem sftp /usr/libexec/openssh/sftp-server [root@NACAPP1S ~]# mkdir /opt/na/telephoneInerface [root@NACAPP1S ~]# mkdir /opt/na/telephoneInerface/conf [root@NACAPP1S ~]# chown mtsftp:sftpusers /opt/na/telephoneInerface/conf [root@NACAPP1S ~]# service sshd restart Stopping sshd: [ OK ] Starting sshd: [ OK ]
but when i want to connect from an other server in the same address range ( from which i can access to vua ssh), i receive this message
[root@NACAPP2P ~]# sftp mtsftp@10.80.214.106 Connecting to 10.80.214.106... mtsftp@10.80.214.106's password: Write failed: Broken pipe Couldn't read packet: Connection reset by peer [root@NACAPP2P ~]#
please could you help me
Responses