SSH offers more than just a secure, remote terminal environment. You can use SSH to tunnel your traffic, transfer files, mount remote file systems, and more. These tips and tricks will help you take advantage of your SSH server.
SSH doesn’t just authenticate over an encrypted connection – all your SSH traffic is encrypted. Whether you’re transferring a file, browsing the web, or running a command, your actions are private.
SSH Tunneling
SSH tunneling allows a remote SSH server to function as a proxy server. Network traffic from your local system can be sent through the secure connection to the SSH server. For example, you could direct your web browsing traffic through an SSH tunnel to encrypt it. This would prevent people on public Wi-Fi networks from seeing what you’re browsing or bypass website and content filters on a local network.
Of course, the traffic becomes unencrypted when it leaves the SSH server and accesses the Internet. To a web server you access through the tunnel, your connection will appear to be coming from the computer running your SSH server, no the local system.
On Linux, use the following command to create a SOCKS proxy at port 9999 on your local system:
ssh -D 9999 -C user@host
The tunnel will be open until your SSH connection terminates.
Open your web browser (or other application) and set the SOCKS proxy to port 9999 and localhost. Use localhost because the tunnel entrance is running on your local system.
We’ve also covered using PuTTY to set up an SSH tunnel on Windows.
SCP File Transfers
The scp, or secure copy, command allows you to transfer files between a remote system running an SSH server and your local system.
For example, to copy a local file to a remote system, use the following syntax:
scp /path/to/local/file user@host:/path/to/destination/file
Read more: How-to geek
QR: