Linux (and all UNIX-based systems for that matter) is a pretty well
thought out operating system with tones of useful features. I use either
macOS or Linux every day for work and leisure and feels like every day I
learn about some new cool features I can use to make my life as a
researcher and nerd incredibly useful.

One of these features which I have come to use a lot is the ssh
command – more specifically, SSH Forwarding. For those who identify as
sysadmins, this may not sound very exciting but there is a lot more to
this feature than what people think!

What is SSH?

For those who are unfamilar with SSH, Wikipedia describes this as…

a cryptographic network protocol for operating network services
securely over an unsecured network.^[1]^ Typical applications
include remote command-line, login, and remote command execution,
but any network service can be secured with SSH.

Wikipedia

TLDR: A secure way to control a remote computer over an unsecured
network.

The general syntax for SSH is as follows:

<pre class="wp-block-code">```
ssh [your-username]@[url-or-ip]

Unless you have already configured SSH keys (which I\\’m assuming you  
haven\\’t) you will then be prompted to enter your password.  
Congratulations! You have successfully logged into the server and can  
now control over it!

### Useful commands

Now that you can connect to the server, you can start to perform some  
really cool networking hacks between your local machine (the client) and  
the server! With respect to forwarding, these features come in one of  
two forms; local and remote forwarding.

#### Local Forwarding

Local forwarding is the ability to send data from your *local* machine  
to a *server* by mapping a pair of ports together. Basically, your local  
machine shall listen for a connection on a given port (let\\’s call this  
port *A*) and tunnel it to a server where it will receive it on port  
*B*.

The syntax for this goes like this using the `-L` listen flag: