![]() ![]() Select Add to add the settings, and then select Open to open an SSH connection.Here are the typical usage scenarios of SSH tunneling: The port on the client that you wish to forward.Local TCP forwarding is a local port forwarding to a remote server.Remote TCP forwarding is a remote port forwarding to a local computer.Double SSH tunnel – allows to connect computers without allocated pubic IP addresses or behind NAT/firewall through an SSH server (if OpenVPN solution is not applicable).Securing RDP with the SSH Tunnel (Local TCP Forwarding) In this mode, you create a local TCP port on your computer. All connections to this port will be forwarded to the specified port on a remote server via the SSH tunnel. The general connection diagram looks like this: In this example, we will create a local port 8888, and the connection to it will be redirected to RDP port 3389 on a remote Windows host. We need an SSH client for port forwarding. To create an SSH tunnel with a remote host 192.168.1.90, run the command: Get-WindowsCapability -Online | ? Name -like 'OpenSSH.Client*' Run the following command in the PowerShell console to install the OpenSSH client on Windows 10/11 or Windows Server 2022/2019: You can use a third-party client (like Putty), but I will use the built-in SSH client on Windows. ![]() Ssh -L 8888:192.168.1.90:3389 can use the sshpass tool to provide password automation for SSH login. To automatically connect to a remote RDP host with a saved SSH password, use the following bat file: Run the Remote Desktop Connection client (mstsc.exe) and save the connection settings to the localhost-3389.rdp file: Computer: localhost:8888 You can run this tool through the WSL2 subsystem for Windows. How to Create SSH Tunnel on Windows with Putty? Or (preferably) set up SSH key authentication. Let’s look at how to create an SSH tunnel on Windows using the popular SSH client Putty.Run PuTTY and navigate to Connection -> SSH -> Tunnels.Specify the local port number in the Source port (in our example, it is 8888).Specify the IP address of the SSH server and the port on the remote host to forward the connection: 192.168.31.90:3389.Select Local destination and click Add.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |