当远程主机(服务器)在软件或硬件的系统升级后,NX的认证文件会发生改变,导致Client端无法连接或链接失败。
一般连接失败的提示信息如下:
NX> 203 NXSSH running with pid: 2404
NX> 285 Enabling check on switch command
NX> 285 Enabling skip of SSH config files
NX> 285 Setting the preferred NX options
NX> 200 Connected to address: 218.193.***.*** on port: 22
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
HELLO NXSERVER - Version 3.2.0-16 - LFE
NX> 105 Hello NXCLIENT - Version 3.2.0
NX> 134 Accepted protocol: 3.2.0
NX> 105 Set shell_mode: shell
NX> 105 Set auth_mode: password
NX> 105 Login
NX> 101 User: ubuntu
NX> 102 Password: *******
NX> 500 Authentication failed
NX> 500 Remote host identification has changed
NX> 500 Offending key in /usr/NX/home/nx/.ssh/known_hosts
NX> 999 Bye.
NX> 280 Exiting on signal: 15
从信息中我们可以看出,如果输入密码没有错误,那就是由于上述的原因导致了连接失败。
解决方法是:
清除known_hosts文件,然后重新连接即可。
清除文件命令::/$ rm -r /usr/NX/home/nx/.ssh/known_hosts