Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
10-21-2005, 09:29 AM
|
#1
|
LQ Newbie
Registered: Sep 2005
Distribution: Debian Etch
Posts: 14
Rep:
|
setting up ssh tunnel for vnc
hello. i want to set up a putty ssh client in a way to tunnel a vnc connection. i want the computer with putty to act as a vnc server. How do i set up the tunnel?
Port 5900, etc...
i know that if i want the putty computer to act as a vnc client, i have to set up the port 5900 and destination "localhost:5900" with option: local
But this doesn't work for being a server...
thanks
|
|
|
10-21-2005, 12:16 PM
|
#2
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
The first thing you have to know is the screen number your vncserver is running on. That is usually :1, but not always. The reason you need to know this is because the server is listening on port 5900+screen number. So to connect to screen :1, you need to tunnel port 5901 and to listen to screen :2, you need to tunnel 5902.
Then to connect through Putty, you usually need to connect to localhost:screennumber. so localhost:1 for screen 1.
|
|
|
10-22-2005, 10:37 AM
|
#3
|
LQ Newbie
Registered: Sep 2005
Distribution: Debian Etch
Posts: 14
Original Poster
Rep:
|
I know that port settings. My only question is how to configure putty-tunnel:
When i configure the putty machine as a vnc client, i configure the tunnel like:
Port: 5900
Destination Port: localhost:5900
and a "x" on local.
Then i type in vncviewer: localhost:5900 and it works.
Now if i want to do the opposite, how can i configure it? I guess my "x" will be on remote... Then, i guess the port will be the same or 5901 or 5902... ok. And what about the destination Port? also localhost:5900 or the ip address from the ssh-server that wants to run a vnc viewer? and on the ssh server which runs the vnc viewer: how do i configure the vncviewer? on localhost or on serverīs ip?
Thanks again.
|
|
|
10-22-2005, 12:38 PM
|
#4
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
OK, I think I know where you're confused. Lets assume that vncserver on the remote box is on screen 1, so we're using port 5901. In Putty, you want the local port to be 5901 and the remote port to be 1.2.3.4:5901 only replace 1.2.3.4 with the LAN IP address of the remote machine.
So on my network, I have an IP address from my ISP (the WAN IP) and my Linux box has an LAN IP address (192.168.1.50) that is non-routable. So to make the SSH connection, I connect to the WAN IP address (which is forwarded to my Linux box) but to make the tunnel I use the LAN IP address. So on my Putty, the Destination port is 192.169.1.50:5901. If the ssh connection is OK, I then fire up a VNC client (on the local machine) and point it at localhost:1 and the connection is made.
|
|
|
All times are GMT -5. The time now is 06:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|