ssh
Secure Shell. A protocol for operating network services securely over an unsecured network. The standard usage is to log into a remote machine.
Synopsis
ssh [options] [user@]hostname [command]
Core Options
-i identity_fileSelects a file from which the identity (private key) for public key authentication is read.
-p portPort to connect to on the remote host (default 22).
-L port:host:hostportLocal port forwarding.
Usage Examples
Basic Login
Log in to a remote server as 'user'.
ssh user@192.168.1.10Specify Key File
Log in using a specific private key file.
ssh -i ~/.ssh/my_key.pem user@example.comExecute Remote Command
Run a command on the remote server and exit.
ssh user@server 'ls -la /var/www'Local Port Forwarding
Forward local port 8080 to port 80 on the remote server (access remote localhost:80 via your localhost:8080).
ssh -L 8080:localhost:80 user@serverBuilt for builders.