So we connect our VNC client to the laptop (localhost or 127.0.0.1 should work) and point it to port 59001 instead of the standard port 5901. In our case, we created a tunnel that terminates on your laptop at port 59001. ![]() Normally, we would point it directly to the server we want to VNC into. We then start the VNC client on our laptop. Aside from that- your login session will look and feel just the same. The difference here is that we’re also telling PuTTY to set up a tunnel for us pointing to the remote server as well. You’re effectively logging into the landing pad just like you would on any other day. I’m making the obvious assumption here that you have the landing pad accessible to the internet on port 22 and that you have an SSH server running that will accept such connections. We first establish the tunnel from the laptop, through the landing pad and finally to the remote server. We have to start a VNC server on the target computer, along with configuring a password to keep everyone else out. So let’s take a step back and review what we’ve effectively done here: ![]() The next step is to launch a VNC Viewer on your laptop and point it to your local machine on port 59001:Ĭlick the connect button and you should see the next window prompting you for the password you set up earlier:įinally, once you click OK you will be brought to your VNC Desktop on the machine inside the remote network! If you log out of the shell, it also tears down the tunnel so keep this window open while you’re using the tunnel. Keep in mind that this SSH session you have open is the only thing keeping that tunnel open. Once you see the user prompt and you’re logged in, the tunnel is now in place. In this screenshot, I’m using root to log in however generally it’s a good idea to use a non-privileged user to log into any machine: This will launch the PuTTY terminal and prompt you for your password. Once you have the Source port and Destination fields filled in, click Add and it will pop into the window as seen below: ![]() Remember, you aren’t putting the IP address of the landing pad here- we want the target server in the Destination field. Here, populate the source port (59001 in my example), the IP address of the final destination server along with the port you want to connect to on that machine (5901 in my example). Next, scroll down on the left hand side in the Category window and select Tunnels. First, fire up Putty and populate the username and IP address of the landing pad server in our example (substitute yours of course). Now I’ll show you how to configure PuTTY to create the tunnel. This is because you’re sending that traffic through the SSH tunnel that we set up rather than pointing it directly to the server you want to reach. It may seem odd to connect your VNC client to the laptop’s localhost address in order to reach the target machine. We pointed our VNC client to the address and port of the tunnel we just created, so the traffic is sent through the tunnel into the external Landing Pad and being forwarded on into the remote network:įinally, the tunnel terminates on the server inside the remote network and connects the tunnel to port 5901 on that machine: Once the tunnel is in place, fire up your favorite VNC client and point it to 127.0.0.1 or localhost on port 59001: I’ll show an example of what options you need to select inside the Putty connection later. Here are some enlarged views so you can see what’s going on. This is a visual example of what the connection looks like: The one thing I will say is make sure you use a password when you start it up. I won’t go into how to set up a VNC Server on linux as there are plenty of tutorials out there that will cover it. I will then open a tunnel to another machine inside the remote network that will establish a connection to the VNC server running on that machine. In this scenario, I will be using my laptop at home to connect into a landing pad UNIX machine at work. Anyway- SSH tunnels can be a bit confusing to the lay person so I thought I’d do a graphical illustration to help that out. It’s just that a majority of my work is done from a windows machine and I refuse to install the bloated CYGWIN app on my machine just to get an ssh command line session. You aren’t limited to doing this with PuTTY or VNC. What if you need to be on the GUI console of the target machine inside the firewall and the firewall doesn’t allow the port you need to use?Įnter VNC and PuTTY. That’s all fine and dandy if you don’t need a GUI. Normally I just ssh in and then jump to the machine I need to be on. ![]() From time to time I have a need to connect to a system inside another remote network (usually my work).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |