Ad space (banner)
🖥️Linux Lessons
Lesson 39 / 61

Connecting to a Remote Server with ssh

ssh is for when "I want to connect to a server far away and operate it." ssh stands for Secure Shell, and it lets you log into and operate a remote server over an encrypted, secure connection.

Use it in the form ssh username@hostname. Besides password authentication, using safer key-based authentication (a private/public key pair) is also common.

Running ssh user@example.com attempts to connect to the server example.com as the user user; once authenticated, you can operate that server's terminal.

A common early mistake is a mistyped destination IP or port, or a key file whose permissions are too permissive, getting the connection refused. A private key's permission needs to be set to 600.

In real work, this is the entry point for nearly every task involving a server: production deployment, checking logs, troubleshooting, and more.

Linux
Try it (type this into the pseudo terminal)
ssh user@example.com

🧑‍💻 You can type this command into the Linux pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)