ssh
Secure shell for remote login, tunneling, and secure command execution.
Synopsis
ssh [options] user@host
Core Options
-i fileUse a specific private key.
-p PORTConnect to a custom port.
-L LPORT:HOST:RPORTLocal port forwarding.
-R RPORT:HOST:LPORTRemote port forwarding.
-J hostProxyJump via a bastion host.
-NDo not execute remote command (tunneling only).
Usage Examples
Connect with Key
Login using a specific key.
ssh -i ~/.ssh/id_ed25519 user@serverCustom Port
SSH on port 2222.
ssh -p 2222 user@serverLocal Port Forward
Forward local 5432 to remote DB.
ssh -L 5432:localhost:5432 user@serverJump Host
Connect via bastion.
ssh -J user@bastion user@internalBuilt for builders.