Strovent Systems
Terminal
Enterprise
Modernization
Resources
Contact
Sign in
Help
/
Terminal reference
/
SSH concepts
Reference
SSH concepts
Key types, known hosts, certificates, agents, jump hosts and port forwarding.
Search help
SSH: how it works
The layers of an SSH connection, what happens when you connect, and the words you will see.
Key types and formats
Ed25519, ECDSA and RSA keys, security keys, and the file formats you might be handed.
Convert a PuTTY .ppk key to OpenSSH format, and PPK version 3
How to export a PuTTY .ppk key as an OpenSSH key with PuTTYgen, which export option gives the newer format, and what PPK version 3 means for older tools.
Known hosts and fingerprints
How SSH checks the host, what the first-connection prompt and the known_hosts file mean, and what to do if the key changes.
SSH host certificates and @cert-authority in known_hosts
How a @cert-authority line in known_hosts lets SSH trust every host certificate signed by one CA, how to sign a host key, and why a client still prompts.
OpenSSH certificates
How a certificate authority signs SSH keys, what a user certificate contains, and how to make one.
The agent and agent forwarding
What an SSH agent does, how forwarding works, and why it carries a risk.
Jump hosts (ProxyJump)
How a bastion or jump host works, why it is safe, and the syntax for one or several hops.
Port forwarding: local, remote, dynamic
Local, remote and dynamic forwarding: what each does, the syntax, and the limits.
Authorized keys and permissions
Where the host stores your public key, the file permissions it insists on, and why a key login can fail.
Security keys (FIDO2) with SSH
How a hardware security key is used for SSH, the key types, and what touch and PIN mean.
The ssh config file
The options in a client config file that save typing: host names, users, keys, jump hosts and keep-alives.
SSH keep-alives and idle timeouts
What ServerAliveInterval, ClientAliveInterval and TCPKeepAlive do, which side each one belongs on, and why an SSH session can still drop.
SSH to a Mac from a phone or tablet, Remote Login and sleep
To SSH into a Mac, turn on Remote Login in Sharing settings and keep the Mac awake. A sleeping Mac or a closed laptop lid stops answering SSH connections.
Telnet to port 22: what the SSH-2.0 banner means
Telnet or nc to port 22 shows a line like SSH-2.0-OpenSSH_9.6. That proves an SSH server is reachable, but Telnet cannot log in to it. How to read the result.
ssh-copy-id through a jump host (ProxyJump)
ssh-copy-id has no -J flag, but it passes -o to ssh. Run ssh-copy-id -o ProxyJump=jump.example.com
[email protected]
, or set ProxyJump in ~/.ssh/config.
Hashed known_hosts: find, remove or hash hosts with ssh-keygen
Hashed known_hosts entries hide the host name and cannot be decoded. Use ssh-keygen -F host to find one, -R host to delete it, and -H to hash an existing file.
Rotate an SSH host key without warnings: UpdateHostKeys
Add the new host key next to the old one, let OpenSSH clients learn it through UpdateHostKeys, then remove the old key. Clients that learned it see no warning.
SSH port forwarding through a jump host: -J with -L
Combine -J and -L: ssh -N -J
[email protected]
-L 5433:db.internal:5432
[email protected]
. The last host in the chain connects to the destination.
Use a different SSH key for the jump host and the target
ssh -i applies only to the target, not to a -J jump host. Give each host its own Host block with IdentityFile, or pass the jump key in a ProxyCommand.
Change or remove an SSH key passphrase with ssh-keygen -p
Run ssh-keygen -p -f with the key file, type the old passphrase, then a new one, or press Enter twice to remove it. The public key stays the same.
SSH ControlMaster: reuse one connection with ControlPath and ControlPersist
ControlMaster lets later ssh, scp and sftp commands reuse one open SSH connection, with no new login. Set ControlMaster, ControlPath and ControlPersist.
Kill a frozen SSH session with Enter ~. (OpenSSH escape sequences)
Press Enter, then ~ then . to close a hung OpenSSH session at once. Use ~~. for the inner ssh in a nested login, ~? for the list, and EscapeChar to change ~.
Keep an SSH tunnel running: autossh, ServerAliveInterval and systemd
A tunnel stays up when ssh exits as soon as the link dies and something restarts it. Use ServerAliveInterval, ExitOnForwardFailure, and autossh or systemd.
Check which CA signed an SSH certificate, and revoke a certificate with a KRL
Read an OpenSSH user certificate with ssh-keygen -L, compare its Signing CA with the CA key the server trusts, and revoke a certificate by serial or key ID.
Use an ed25519-sk security key with ssh-agent: ssh-add, providers and macOS
How ssh-add loads an ed25519-sk or ecdsa-sk key into ssh-agent, what SSH_SK_PROVIDER and ssh-agent -P change, and two OpenSSH installs on one Mac.
SSH with a FIDO security key never asks me to touch the key
When ssh shows "Confirm user presence for key", when the prompt goes through ssh-askpass instead, and how no-touch-required keys skip the touch altogether.
sshd_config.d drop-in ignored: the first value wins (KexAlgorithms and others)
A setting in /etc/ssh/sshd_config.d/99-something.conf seems to be ignored. sshd uses the first value it reads for most keywords, so an earlier file wins.
bind_address in ssh -L and ssh -R: localhost, * and GatewayPorts
The optional first field of ssh -L and -R picks the address a forwarded port listens on. What localhost, * and an IP mean, and how GatewayPorts decides.
ssh -R with port 0: let the server pick the port, and find out which one
ssh -R 0:host:port asks the server for any free port. ssh prints "Allocated port N for remote forward", and with -O forward the number alone, for scripts.
Turn off the SSH login message: motd, "Last login" and the pre-login banner
The text after an SSH login comes from the motd, PAM and Last login; the text before the password is the Banner. Hide yours with ~/.hushlogin or change sshd.
SSH "Warning: Permanently added ... to the list of known hosts": what it means
ssh prints this when it saves a new host key to known_hosts. Seeing it on every connection means the key is not being saved. How to fix that or hide it.
Other categories
Getting started
Terminal types
SSH and Mosh
Files and printing
Scripts and auto-connect
Using the app
Subscriptions
Troubleshooting
3270 concepts
5250 terminal
IBM i sign-on, Telnet and messages
VT and xterm basics
Unix shell and tmux
SSH error messages
SFTP and scp
Mosh
z/OS file transfer
z/OS: TSO, ISPF and CICS
Basics and glossary
References and resources