• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Urban Penguin

The Urban Penguin - Linux Training

  • Home
  • About
  • Live Online Courses
  • Shop
  • Programming
    • Master Editing Text Files Using VIM
    • Learn Shell Scripting with BASH
    • PERL Scripting in Linux
    • Ruby Scripting in Linux
    • Scripting with PowerShell
    • Learn C Programming using Linux and the Raspberry Pi
    • General Java Tutorials
    • Java 7 OCA Exam 1ZO-803
  • OS Tutorials
    • Red Hat and CentOS Training
      • Red Hat Enterprise Linux System Administration 1 – RH124
      • RHCSA – System Admin 2 – RH134
      • RHCE – EX294 – Automation With Ansible
    • Learning Ubuntu
    • LPI Training
      • LPI Linux Essentials
      • LPIC-1 Linux Administrator
      • LPIC-2 Certified Linux Engineer
      • LPIC-3 Senior Level Certification
        • LPIC-3 Exam 300 : Mixed Environments
        • LPIC-3 Exam 303 : Security
        • LPIC-3 Exam 304 : Virtualization and High Availability
    • Linux Technologies
      • Apache HTTPD Server
      • Learning PHP
      • Learning PUPPET
      • Learning SAMBA
      • Linux File-Systems
      • Monitoring with Nagios Core
      • MYSQL
      • openLDAP Directories on Linux
You are here: Home / Linux / CentOS / Creating a PuTTY SSH Tunnel

Creating a PuTTY SSH Tunnel

April 17, 2014 by The Urban Penguin

PuTTY SSH TunnelOften SSH tunnels are shown from Linux to Linux but frequently, we need to create an encrypted SSH tunnel from Windows to a service on Linux using PuTTY. Using Windows 7 we will create a PuTTY SSH tunnel to our CentOS 6.5 box. Ensuring that our VNC traffic is encrypted from Windows to CentOS is secured. Ultimately giving secure access to the Servers GUI display from Windows.

VNC Service

Firstly, we already have the VNC Service set up on the host 192.168.0.60 and it is listening on display 2 or port 5902. Rather than connecting directly to the VNC service, which is unencrypted, we will use an SSH Tunnel from the Windows client. All the work you will see is from the Windows 7 client.

PuTTY Connection

Starting the Putty Client on Windows we add in the normal SSH connection details. The user and server we wish to connect to.

ssh


With this complete and BEFORE, we connect we navigate to the SSH and Tunnels configuration page. This is where we define the PuTTY SSH Tunnel. You should see something similar to the following.

tunnel

Local Port

Next, we add the source port, in this case, 9090. This is the local port that we will listen to on the Windows 7 system. This can be any high number port, above 1024 that is not in use. Then we add the destination of the service that we want to connect to, in our case the VNC service on the Linux host: 192.168.0.60:5902. Using the ADD button we create the record. Now, finally,  we can connect. The ssh terminal window will open and prompt for the password.; however, we also should have the tunnel in place.

Putty Event Log

Using the event logs in PuTTY we can verify that the tunnel has been created.

event log

We are looking for the entry that says we are forwarding the local port.

We are now able to use the VNC client to connect to the localhost on port 9090 which will be forwarded via the SSH tunnel to the VNC service on the CentOS 6.5 host.





Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to print (Opens in new window)

Filed Under: CentOS

Primary Sidebar

Newest Video

The Urban Penguin On Youtube

Categories

Pages

  • About The Urban Penguin
  • Contact Us
  • Shop
    • Basket
    • Checkout
    • My Account
  • LPI Training from The Urban Penguin
    • Live and Pluralsight hosted courses
    • Complete Linux Essentials
    • LPIC-3 Senior Level Certification
      • LPIC-3 Exam 300 : Mixed Environments
      • LPIC-3 Exam 303 : Security
      • LPIC-3 Exam 304 : Virtualization and High Availability
    • LPIC-2 Certified Linux Engineer
    • LPIC-1 Linux Administrator
    • LPI Linux Essentials for Raspberry Pi
    • LPI Linux Essentials
  • Operating System Tutorials
    • Linux Foundation Training
    • Solaris 11 OCA 1ZO-821
    • Learning Ubuntu
    • Learning SUSE
    • Red Hat and CentOS Training
      • RHCE – EX294 – Automation With Ansible
      • RHCSA – System Admin 1 – RH124
      • RHCSA – System Admin 2 – RH134
  • Scripting – the power of repetition!
    • Java 7 OCA Exam 1ZO-803
    • General Java Tutorials
    • Learn C Programming using Linux and the Raspberry Pi
    • Ruby Scripting in Linux
    • Scripting with PowerShell
    • PERL Scripting in Linux
    • Learn Shell Scripting with BASH
    • Master Editing Text Files Using VIM
  • Linux Technologies
    • Learning PUPPET
    • openLDAP Directories on Linux
    • Monitoring with Nagios Core
    • Linux File-Systems
    • Learning SAMBA
    • Apache HTTPD Server
    • Learning PHP
    • MYSQL
  • OpenStack
    • Pluralsight
    • Udemy
    • Raspberry Pi Tutorials
    • Citrix Videos
  • Online Instructor-led Courses
    • Red Hat Enterprise Linux System Administration 1 – RH124
    • SELinux Masterclass
    • Bash Scripting Masterclass
    • Nftables Masterclass

© 2021 The Urban Penguin · All Rights Reserved