Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How To Create A SSH Tunnel With PuTTY

2 views
Skip to first unread message

Rory Falu

unread,
Dec 26, 2023, 1:25:46 PM12/26/23
to
SSH tunneling with PuTTY is a useful tool for encrypting your network traffic or accessing services on other networks securely. Using this software, you can relay network traffic securely from one network site to another, guarding your information against hacking and eavesdropping. This also allows you to connect to things that may be blocked locally, that your remote server has access to.



How to create a SSH tunnel with PuTTY

Download https://vixiltuibu.blogspot.com/?tg=2wWAjK






To use SSH tunneling with PuTTY, you will need to have a working installation of PuTTY on your computer. You will also need the hostname or IP address of the remote SSH server, as well as the username and password (or other authentication method) for an account on that server.


There are many situations in which SSH tunneling can be useful. For example, you might use this technique if you need to securely access services on a remote network, but the network does not have a VPN. In this case, you can use SSH tunneling to create a secure connection to the remote network, and then access the services you need as if you were on the network directly.


If you are going to use the tunnel to connect with PuTTY to another server, you can actually set up the tunnel as a part of the session settings with use of plink as a proxy, see: PuTTY configuration equivalent to OpenSSH ProxyCommand.






Store this in a batch file (file extension ".bat", e.g. "tunnel.bat"). So every time you double-click on this file the command is run and putty creates the ssh tunnel. If you want more tunnels just repeat this part


It also provides you option to create SSH tunnel to provide access to resource within the trusted internal network. With the help of SSH tunnel you can access resources available on other ports, which is not directly accessible from your system. Once you forwarded your localhost port to the port listening on remote network, you can directly access the the remote service by accessing configured port with localhost.


Add hostname of the SSH server you want to access remotely.In the left sidebar under the Category options. Navigate to the Connection >> SSH >> Tunnels.Select Local to define the type of SSH port forward. In the Source port field, enter the port number to use on your local system. (For example Source port: 5050) Next, In the Destination field, enter the destination address followed by the port number. (For example Destination: 127.0.0.1:5432). Verify the details you added and press Add button. You can add multiple entries here.All done. Connect the SSH session to make the tunnel. The tunnel will work until the SSH session is activeRemote Port Forwarding with PuTTYThe Remote forwarding allows a remote system to access resources from your local machine. Remote forwarding represents an inversion of the local forwarding process as described above.


In this procedure, we will use Internet Explorer, Firefox and an RDP connection to demonstrate the use of a tunnel with an SSH connection, as well as configuring the tunnel with several other protocol types.


Is there a way by which I can launch a VNC viewer on my laptop and access the VNCServer? I understand that it might be done using ssh tunneling features and I have putty on my Windows laptop (sorry, no Linux or Cygwin etc. can be installed on the work laptop). Any help will be greatly appreciated as this would make my life so easier!


Local tunnels produce a localhost port opening on your windows machine that remotes to the ip address and port you specify. For instance, when I'm trying to RDP to a desktop at my house, I'll generally choose a random local port, something like 7789, then put the local ip address of the desktop (1.2.3.4:3389) as the remote host. Be sure to click "Add", then "Apply." At this point, when you rdp to 127.0.0.1:7789, you'll then connect to 1.2.3.4:3389 over the putty session.


This is where the fun comes in. If you then setup a port tunnel on your intermediate box, setting up the local port you specified as the remote port in putty, you can then bounce through your putty, through the intermediate box your final destination. You'll still need to do a few ssh connects, but you'll be able to cross vnc or rdp directly from the windows system once you're set, which is what I believe you're looking to do.


First create hop to gateway #1. First setup the connection to thefirst server. Setup a tunnel to the second gateway inConnection>SSH>Tunnels. In this example we're forwarding port 2222to the second gateway.


After pressing start button, Putty opens a regular ssh terminal session successfully but nothing happens. (options show active port forwarding). I've checked with netstat -l that port 512 is not listening on RmtSrv. ssh on this port returns 'connection refused'. What am I doing wrong? May be there is something in the sshd_config that needs to be changed in order to allow the tunneling? Could it be user privileges on RmtSrv that prevents me from creating tunnels? I have sudo btw.


C: This is your device, you can be device B if you want, which will skip a step. If your PC is directly accessible by device A (as in your device is is running an SSH server) then you can be the tunnel endpoint. This way you can reverse tunnel directly from B to A. Otherwise there will be two putty SSH connections, A to B, then C to B.


Destination: this is the port that will be tunneled into on machine A. This is the port your application is running on, so for us its VNC which is port 5900. Localhost is needed so the tunnel with end with machine A.


So we now have the host we need to get to (A) connected to our SSH server (B). Host B is now listening internally on port 5901 for connections to tunnel back to host A port 5900. Note that this port is not open to the internet, its only listening on host B localhost interface. The next step is to create a new tunnel from host C to host B and connecting the two tunnels together.


I have configured a putty session to login into a server (server A) and make an ssh connection to another server (server B) automatically by adding a remote command in putty (ssh server B) for the putty session to login into server A. This works fine. now I want to access a service running on port 8443 from the browser on my local host. I have tried to create a ssh tunnel in putty using source port as 8443 ad destination as 8443:localhost:8443 but it doesn't work. Please help!!


In the Host Name I placed the server to connect to (the one with the DB: my.db.domain), but the login credentials relate to the tunnel's my.tunnel.domain (e.g. Connection > Data has the tunnel's domain user and Connection > SSH > Auth has the tunnel's domain private key).


In this tutorial you will create tunnels in two ways: first by using the PuTTY for Windows application, and then by using the ssh command in a UNIX command shell. You will confirm that the tunnel was created by launching the remote WebLogic Server Administration Console on the VM as though it was local.


You need an SSH client to create an SSH tunnel. This tutorial describes two ways to create a tunnel, one using a Windows GUI client, called PuTTY, and one using the ssh utility at the command line. You don't have to do both, although you might want to learn both ways. You'll need one or both of the following:


Note: It is not a general requirement of SSH tunnels that the port numbers match. However, it is a requirement of the JMX/RMI protocol that is used for communicating with the port on the Administration Server.


The tunnel is now created. Any packets sent to the client's port 9001 will reach the VM's port 9001. In this tutorial, you established a connection between port 9001 on your client and port 9001 on the VM that hosts WebLogic Server. So you can now access port 9001 on the Administration Server (on the VM) by connecting to your client's port 9001.



Note: This "port forwarding" established by the tunnel is different from a regular SSH session, which simply provides the secure shell for logging into and issuing commands on a remote computer.


Not only will this article show you how to create a SSH terminal connection to an EC2 machine, but it will also show you how you can setup pgAdmin to connect and administer a RDS hosted PostgreSQL database without having to expose the RDS instance on a public subnet!


An SSH tunnel is a way to create a secure connection from a local computer to a remote one over a SSH connection done by mapping a local port on your machine to a remote IP address/port combination.


In the latest version (9.4.0.5174), I can set up the tunnel, but when plink gets prompted for they keyboard-interactive OTP code, HeidiSQL only shows a message box with now way to enter the actual code (see attachment).


I know this thread is old-ish but if someone is still looking for an answer on this, using the passphrase in the password field of the ssh tab, will work fine. It is unintuitive since password != passphrase but it is what it is. No ugly port-tunneling through putty needed;)


I am trying to set up SAS ODBC connection to sas server installed on linux. I have sas ODBC installed on my local (windows)cand now I need to connect to the sas session on the SAS server. My approach : trying to create a port forward using putty on windows and then configuring ODBC.


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:


A SOCKS proxy is an SSH encrypted tunnel in which configured applications forward their traffic down, and then, on the server-end, the proxy forwards the traffic to the general Internet. Unlike a VPN, a SOCKS proxy has to be configured on an app-by-app basis on the client machine, but you can set up apps without any specialty client software as long as the app is capable of using a SOCKS proxy. On the server-side, all you need to configure is SSH.

0aad45d008



0 new messages