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服务,再次连接即可成功