Connect with a specific key
Set the private key file explicitly
ssh -i ~/.ssh/id_ed25519 user@host
More ssh commands
-
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
-
ssh -R 8080:localhost:3000 user@vps -NMake local port 3000 available as port 8080 on the VPS
-
ssh -D 1080 user@vps -N -fCreate a local SOCKS5 proxy on port 1080 that tunnels through the VPS and runs in the background