Glossary

ssh

ssh ("secure shell") opens an encrypted connection to a remote host, giving you an interactive shell or letting you run a command remotely. It has almost completely replaced telnet, rsh, and rlogin, which sent passwords in plain text.

ssh user@host                    # interactive login
ssh host                         # use current username
ssh -p 2222 host                 # non-default port
ssh host 'uptime'                # run a single command
ssh -i ~/.ssh/id_ed25519 host    # use a specific key
ssh -L 8080:localhost:80 host    # local port forward
ssh -J bastion host              # jump through a bastion host

Modern best practice is public-key authentication with Ed25519 or RSA-4096 keys instead of passwords. Configuration lives in ~/.ssh/config (per-user) and /etc/ssh/sshd_config (server side). ssh-agent caches decrypted keys so you do not re-enter the passphrase for every connection.

Related terms: scp, sftp, public-key-cryptography

Discussed in:

Also defined in: Textbook of Linux

Textbook of Linux — Learn Linux on iPhone — Download on the App Store