Answer the question
In order to leave comments, you need to log in
What's wrong with setting sftp: Couldn't read packet: Connection reset by peer?
Hello.
Configured on CentOS sftp:
added group groupadd sftp
created user useradd -m sftp_user_1 -s /sbin/nologin -g sftp
set password passwd sftp_user_1
changed owner chown root /home/sftp_user_1
set rights chmod 750 /home/sftp_user_1
changed owner chown sftp_user_1:sftp /home/sftp_user_1
checkedid sftp_user_1
[[email protected] home]# id sftp_user_1
uid=1000(sftp_user_1) gid=1000(sftp) groups=1000(sftp)
Subsystem sftp /usr/libexec/openssh/sftp-server
Subsystem sftp internal-sftp
Match Group sftp
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home/%u
ForceCommand internal-sftp
systemctl restart sshd
[[email protected] home]# sftp s[email protected]
[email protected]'s password:
packet_write_wait: Connection to ::1 port 22: Broken pipe
Couldn't read packet: Connection reset by peer
Answer the question
In order to leave comments, you need to log in
when changing the owner, it was necessary to register the group:chown root:sftp /home/sftp_user_1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question