February 2020
Intermediate to advanced
666 pages
15h 45m
English
SSH tunneling, or as it's sometimes called, SSH port forwarding, is a handy way to protect non-secure protocols. For example, by tunneling normal HTTP through an SSH tunnel, you can access a non-secure website in a secure fashion. To do this, you would do the following:
sudo ssh -L 80:localhost:80 donnie@192.168.0.12
I had to use sudo here because all network ports below port 1024 are privileged ports. If I were to change the web server configuration to listen on a non-privileged high-number port, I wouldn't need sudo.
Now, to connect to this site in a secure manner, I can just open the web browser on my local machine and type in the following URL:
http://localhost
Yeah, it seems strange to access a remote machine ...