Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The vncserver command will startup a VNC server that open 3 next available TCP/IP port, starting from 5801, 5901, and 6001 respectively.
Port 5801 is for VNC client connection over HTTP protocol, port 5901 is for VNC client connection over RFB protocol, and port 6001 is to allows X applications to connect to the VNC server.
By executing vncserver for the second time or execute the vncserver :2 command, this will startup VNC server that bind and listen to port 5802, 5902, and 6002 respectively.
To kill the VNC server in Linux, just execute vncserver -kill :1 will kill the first VNC server that bind and listen to port 5801, 5901, and 6001. The vncserver -kill :2 will kill the second VNC server, and so on.
thanks, but I still have a question.
Does anyone can remotely login to the port 6001 and see the desktop ?
I have password set for vnc, so , is my setup secure or not?
is there anyway to test this setup doesn't allow remote passwordless logins?
Thanks in advance.
Quote:
Originally Posted by rathodsuraj1
The vncserver command will startup a VNC server that open 3 next available TCP/IP port, starting from 5801, 5901, and 6001 respectively.
Port 5801 is for VNC client connection over HTTP protocol, port 5901 is for VNC client connection over RFB protocol, and port 6001 is to allows X applications to connect to the VNC server.
By executing vncserver for the second time or execute the vncserver :2 command, this will startup VNC server that bind and listen to port 5802, 5902, and 6002 respectively.
To kill the VNC server in Linux, just execute vncserver -kill :1 will kill the first VNC server that bind and listen to port 5801, 5901, and 6001. The vncserver -kill :2 will kill the second VNC server, and so on.
[niko@localhost ~]$ export DISPLAY=XX.XX.XX.XX:1.0
[niko@localhost ~]$ xterm
Client is not authorized to connect to Serverxterm Xt error: Can't open display: XX.XX.XX.XX:1.0
[niko@localhost ~]$
(where XX.XX.XX.XX is my server's ip address)
and I get 'not authorized' error. Does this mean despite that 6001 port is open for everybody, it is securely set up. Correct?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.