Skip to main content

Create and Use an SSH Tunnel for Network Traffic

Hands-On Lab

 

Photo of Terrence Cox

Terrence Cox

Senior Vice President of Content

Length

01:00:00

Difficulty

Intermediate

Port forwarding via SSH (SSH tunneling) creates a secure connection between your server and a remote machine through which any number of services can be relayed. One reason this can be useful is that you can pass traffic that uses an unencrypted protocol (IMAP, VNC for example) over an encrypted network stream to increase security.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.

Our security team has dictated that all traffic leaving Datacenter 2 (where the CentOS 7 CLIENT is installed) must be encrypted.

Since yum makes http calls that means that it can't run updates or install new packages with the current setup.

Your SSH Tunnel SERVER is running a web server on port 80. Once the tunnel is set up another team will set the SERVER up as a yum repository. You've been tasked with setting up an SSH tunnel so that traffic can be encrypted from the CLIENT to the SERVER which will allow the CLIENT to install new packages. You should additionally create an SSH key so that a password isn't required to connect from the CLIENT to the SERVER as the user cloud_user.