VNC连接失败:The connection was refused by the host computer

当服务器异常退出后,在下一次登陆时会出现如下问题,这种情况应该是服务器IP变了,而vnc还在监听原来的IP上的数据

解决方法:

  1. 用Xshell登陆自己的服务器

  1. 在命令行中输入vncserver,命令行中出现:

Warning: optimal6:2 is taken because of /tmp/.X2-lock

Remove this file if there is no X server optimal6:2

在命令行中输入:

rm  /tmp/.X2-lock

如下图所示(^H是我输错的可忽略):

 

 

猜你喜欢

转载自blog.csdn.net/weixin_36670529/article/details/83216704
今日推荐