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.
Successfully complete this lab by achieving the following learning objectives:
- Make sure you can SSH from the CLIENT to the SERVER without a password
You need to generate an SSH key and copy it over to the SERVER from the CLIENT.
To generate the key simply run:
ssh-keygenand accept all defaults.
To copy the key over to the SERVER simply run:
ssh-copy-id email@example.com enter the password.
- Verify that your SSH tunnel works.
For this task you need to have an SSH tunnel set up. To do so, simply enter the following command:
ssh -f firstname.lastname@example.org -L 2000:10.0.1.100:80 -N