Check a server host key
Get the server host keys and show their fingerprints without logging in
ssh-keyscan -t ed25519,rsa host 2>/dev/null | ssh-keygen -lf -
- tool
- ssh15 commands
More ssh commands
-
echo 'from="10.0.0.0/8",no-agent-forwarding,no-port-forwarding,command="/usr/bin/backup.sh" <pubkey>' >> ~/.ssh/authorized_keysAllow the key only from 10.0.0.0/8, block forwarding and force one command
-
ssh -i ~/.ssh/id_ed25519 user@hostSet the private key file explicitly
-
ssh -J bastion.example.com user@internal-hostReach an internal host through one bastion host with ProxyJump
-
ssh -J user@bastion1,user@bastion2 user@targetChain several jump hosts in one command
-
ssh -L 5432:db.internal:5432 user@bastion -NForward localhost:5432 to db.internal:5432 through the bastion