问题
I have set up an environment with AWS EC2 based on ubuntu 14.04 and configure vncserver
under it. After everything is done, I am able to connect the EC2 instance
with VNC viewer and see the desktop. However, after a period of time idle on vncviewer
, the connection is disconnected and I have error
"Too many authentication failures"
After I restart the vncserver
by going through ssh to EC2, I am able to use vncviewer
to connect to the instance again. Any solution for me to not having the error and connection is not disconnected?
回答1:
You might try these commands:
# echo $DISPLAY
# ps -aef | grep sesman
# netstat -natp | grep vnc
If memory serves, if you get to more than ten no-longer-established vnc sessions, some VNC clients no longer allow additional connections. In this case, you need to kill the vnc processes that no longer have the established status.
回答2:
I faced the same scenario. For me this happened because, multiple sessions of vncserver
was running on my Server. Do the following steps...
Step 1: See the multiple VNC sessions running on your server.
You will see multiple process IDs running. (If not, still proceed to the next steps)
$ pgrep vnc
72063
119177
This is because you have run vncserver
command multiple times on the server.
Step 2: Kill all processes from step 1
$ kill 72063
$ kill 119177
Step 3: Restart the VNC session
$ vncserver
Step 4: Verify whether it is working.
$ nc 104.197.91.140 5901
// alternatively you can use telnet
$ telnet 104.197.91.140 5901
// the response should like this
RFB 003.008
- Simply try loading the VNC viewer session again
来源:https://stackoverflow.com/questions/40166002/get-error-too-many-authentication-failures-by-connecting-to-aws-ec2-through-vn