sftp/ssh报错:/etc/ssh/ssh_config: line 20: Bad configuration option: clientaliveinterval

sftp/ssh报错:/etc/ssh/ssh_config: line 20: Bad configuration option: clientaliveinterval

今天在搭建完sftp服务后发现用其他的服务器连接会报错,但是搭建的服务器本身正常
错误如下:

远程连接服务器上报错如下
/etc/ssh/ssh_config: line 20: Bad configuration option: clientaliveinterval
/etc/ssh/ssh_config: line 21: Bad configuration option: clientalivecountmax
/etc/ssh/ssh_config: terminating, 2 bad configuration options
Couldn't read packet: Connection reset by peer

在这里插入图片描述

搭建的服务器本身正常

在这里插入图片描述
解决方法如下

注释掉连接服务器的这两行 这是某些服务器为了安全考虑的

在这里插入图片描述
重启ssh服务,再次连接即可成功
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_40695642/article/details/105868826