Secure Shell (SSH)#
You're going to be using SSH a lot. It's the primary (pretty much the only) way to access and manage remote Linux systems. There are some other options too, but they're a bit advanced at this point in time.
So, what is SSH? It's a TCP connection on port 22 to a remote host, using cryptographic technology to not only protect the data you're transmitting from being observed, but also to protect it from manipulation. We use this SSH (TCP/22) connection to send commands to the remote server. These commands are executed, and the connection sends back the results (the output) of the command to our local client.
There's a lot of interesting things you can do with this connection, like X-forwarding, proxying and more, but we're going to keep it simple for the time being.
Here's a visual example of an SSH connection using PuTTY on Windows to connect to an OpenWRT router (which runs Linux):
We can see a few things here:
- We're using PuTTY to make the connection
- We logged in as
root
- We got a command prompt after logging in
This is pretty standard for an SSH connection, although in this day and age, PuTTY is mostly obsolete. On Windows 10 and 11, for example, you can use the modern Windows Terminal and its built-in SSH client.