ssh

Secure shell for remote login, tunneling, and secure command execution.

Synopsis

ssh [options] user@host

Core Options

-i file

Use a specific private key.

-p PORT

Connect to a custom port.

-L LPORT:HOST:RPORT

Local port forwarding.

-R RPORT:HOST:LPORT

Remote port forwarding.

-J host

ProxyJump via a bastion host.

-N

Do not execute remote command (tunneling only).

Usage Examples

Connect with Key

Login using a specific key.

ssh -i ~/.ssh/id_ed25519 user@server

Custom Port

SSH on port 2222.

ssh -p 2222 user@server

Local Port Forward

Forward local 5432 to remote DB.

ssh -L 5432:localhost:5432 user@server

Jump Host

Connect via bastion.

ssh -J user@bastion user@internal
Built for builders.