sshfs “对端重置连接”

sshfs “对端重置连接”
ssh -i ~/keys/id_rsa [email protected]
Enter passphrase for key '/home/avin/keys/id_rsa': 
Last login: Tue Jul 17 11:01:28 2012 from 192.168.1.240
[root@rsh_management ~]# exit
logout

没关系我参加!但是...

avin@avin-pc ~/ % sshfs -o ssh_command="ssh -i ~/keys/id_rsa" [email protected]:/ /mnt/201
[email protected]'s password: 
[email protected]'s password: 
[email protected]'s password: 
read: **Connection reset by peer**

还有这个

avin@avin-pc ~ % sshfs -o IdentityFile=~/keys/id_rsa [email protected]:/ /mnt/201
Enter passphrase for key '/home/avin/keys/id_rsa': 
read: **Connection reset by peer**

为什么我会收到“对方重置连接”的消息?

答案1

在服务器上的文件中,/etc/sshd_config此行被注释

# Subsystem sftp /usr/libexec/openssh/sftp-server

答案2

如果你从 sshfs 获得此信息

read: Connection reset by peer

也许有助于将文件设置为只读

chmod 400 /{{path_to_your_key}}/keypair.pem

并重新连接。

相关内容