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服务,再次连接即可成功
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章