pexpect报ssh_exchange_identification异常

现象

使用pexpect的ssh自动登录远程主机时,报

before (last 100 chars): 'ssh_exchange_identification: Connection closed by remote host\r\r\n'

原因

通过

who
ps aux |grep sshd

查询发现该主机上ssh连接数已经达到了最大值……

参考文章

SSH连接服务器报ssh_exchange_identification: Connection closed by remote host

你可能感兴趣的:(pexpect报ssh_exchange_identification异常)