VNC connect:Connection refused(10061)

简介: 在Windows机器上使用VNC Viewer访问Linux服务器,有时候会遇到"connect:Connection refused(10061)"这个错误,导致这个错误出现的原因有多重,下面总结一下:     1:使用VNC Viewer时忘记加桌面号(一般为IP:桌面号,桌面号要看你自己的配置而定。

在Windows机器上使用VNC Viewer访问Linux服务器,有时候会遇到"connect:Connection refused(10061)"这个错误,导致这个错误出现的原因有多重,下面总结一下:

 

 

1:使用VNC Viewer时忘记加桌面号(一般为IP:桌面号,桌面号要看你自己的配置而定。如10.20.34.76:2)

错误使用方法:

正确使用方法:

 

2:Linux服务器的vncserver服务没有启动。

如果vncserver服务没有启动,使用VNC Viewer访问时,就会出现"connect:Connection refused(10061)"错误。

 

3:配置问题导致VNC Viewer访问时,就会出现"connect:Connection refused(10061)"错误。

 

如下截图所示,一次配置VNC的配置文件是,顺手Copy注释部分做了一些修改,然后在Windows 使用VNC Viewer访问时,一直报"connect:Connection refused(10061)",检查vncserver服务、防火墙、配置文件的等等都OK,一直折腾了很久才发现,其实是因为配置文件部分地方弄错了,如下所示, Use "-localhost" to prevent remote VNC clients connecting except when doing so through a secure tunnel. See the "-via" option in the man vncviewer' manual page.

这个参数其实是禁止远程使用VNC Client登录VNC服务器。结果一不小心,自己狠狠把自己折腾了一把,自己被自己蠢哭了。

 

 

注意网上有一些资料,说防火墙配置问题会导致"connect:Connection refused(10061)",但是以我的测试和遇到的案例,防火墙问题只会导致"connect: Connection timed out (10060)" .并不会出现10061这种错误的,当然也不排除是有些环境、平台我没有测试到。

相关文章
|
8月前
|
网络协议 Linux 网络安全
使用frp时遇到的问题connect: connection refuseddial tcp xxxx:7000: connect: connection refused
最近在做的项目需要用到frp来做代理连接本地内网机,卡在最后启动客户端的时候,提示报错:login to server failed: dial tcp xxxx:7000: connect: connection refuseddial tcp xxxx:7000: connect: connection refused!!找了很多尝试的办法,现在给大家列一下希望对大家有帮助。
1472 0
The connection to the server ip:6443 was refused - did you specify the right host or port
The connection to the server ip:6443 was refused - did you specify the right host or port
|
网络安全
mac下 ssh: connect to host localhost port 22: Connection refused
mac下 ssh: connect to host localhost port 22: Connection refused
700 0
mac下 ssh: connect to host localhost port 22: Connection refused
|
Android开发
解决as connection refused: connect错误
解决as connection refused: connect错误
1012 0
解决as connection refused: connect错误
|
Linux 网络安全
解决putty连接报 connection refused
解决putty连接报 connection refused