服务器设置ssh之后,远程sftp连接失败
[quote]
Connection closed by server with exitcode 126
[/quote]
原因是:
"/etc/ssh/sshd_config"
sshd配置文件中引用的sftp不存在造成的
修改配置文件中的相关配置,改为使用internal-sftp
[quote]
Connection closed by server with exitcode 126
[/quote]
原因是:
"/etc/ssh/sshd_config"
sshd配置文件中引用的sftp不存在造成的
修改配置文件中的相关配置,改为使用internal-sftp
#Subsystem sftp /usr/local/ssh/libexec/sftp-server
Subsystem sftp internal-sftp
解决SFTP远程连接失败
本文介绍了当服务器设置SSH后,遇到远程SFTP连接失败并显示“Connection closed by server with exit code 126”的问题时的解决方案。该问题是由于sshd配置文件中引用了不存在的sftp导致的。解决方法是修改/etc/ssh/sshd_config配置文件中的子系统配置,将sftp更改为internal-sftp。
802

被折叠的 条评论
为什么被折叠?



