This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12911|Reply: 0

SFTP Couldn't read packet: Connection reset by peer

[Copy link]
Posted on 2021-4-7 16:50:35 | | | |
The error when using the sftp command to test login is as follows:

[root@VM_0_9_centos itsvse]# sftpitsvse@127.0.0.1
The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:uVdYfzhho+yQR10ozp3vuRAnzWsYMBgW0rKVaEhYVm0.
ECDSA key fingerprint is MD5:e7:d9:fe:c8:3e:9a:36:40:e7:f3:a3:ba:7b:73:fd:a2.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '127.0.0.1' (ECDSA) to the list of known hosts.
itsvse@127.0.0.1's password:
packet_write_wait: Connection to 127.0.0.1 port 22: Broken pipe
Couldn't read packet: Connection reset by peer

Check the system logs and try to log in again


Removed slice User Slice of itsvse.


solution

Change the users and groups to which the folder belongs



Note: The directory permissions set by ChrootDirectory and all the parent folder permissions must be root.

Only the owner can have write permissions for the directory permissions set by ChrootDirectory and all its parent folder permissions, which means that the maximum permission setting can only be 755


(Note:Tested user groups don't have to be root!





Previous:The difference between /bin/false and /sbin/nologin, which prohibits users from logging in
Next:TP-Link router password encryption mechanism
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com