在Filezilla出现received unexpected end-of-file from SFTP server 解决方法

导语:叶子使用filezilla的sftp方式登录一内网服务器的时候,出现什么密钥不匹配的提示(提示没看清),叶子点击了更新密钥,登录的时候出现received unexpected end-of-file from SFTP server。

解决方法

登陆目标主机,使用 cat 查看 /etc/ssh/sshd_config 文件,找到 Subsystem 关键字。

cat /etc/ssh/sshd_config

# override default of no subsystems
Subsystem       sftp    /usr/local/openssh-7.5p1/libexec/sftp-server

查看目标文件即 /usr/local/openssh-7.5p1/libexec/sftp-server 是否存在。

ls /usr/local/openssh-7.5p1/libexec/sftp-server
ls: cannot access /usr/local/openssh-7.5p1/libexec/sftp-server: No such file or directory

文件不存在,将其更改为有效文件并重启 sshd 服务

vi /etc/ssh/sshd_config

...
# override default of no subsystems
#Subsystem      sftp    /usr/local/openssh-7.5p1/libexec/sftp-server
Subsystem      sftp    /usr/libexec/openssh/sftp-server
...

重启sshd服务。

service sshd restart

Restarting sshd (via systemctl):                           [  OK  ]

结束

你学会了吗?其实和那个什么密钥不匹配没有关系额,是一个服务器ssh配置的问题。


Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

Warning: copy(): Failed to enable crypto in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

Warning: copy(https://www.wordpressleaf.com/wp-content/themes/summerleaf/images/tx/20.png): failed to open stream: operation failed in /opt/lampp/htdocs/wordpresssummer/wp-content/themes/summerleaf/inc/summer_setting.php on line 546

发表评论

邮箱地址不会被公开。 必填项已用*标注