ssh
NetworkingSecure Shell - connect to remote machines securely
Options & Flags
Available options for this command
-p portSpecify port number (default is 22)
-i keyfileUse specific private key file
-L port:host:hostportLocal port forwarding
Examples
Common usage examples
Connect to remote host
ssh user@hostnameConnect to remote host on specific port
ssh -p 2222 user@hostnameConnect using specific SSH key
ssh -i ~/.ssh/private_key user@hostnameNotes
- First connection will prompt to verify host fingerprint
- Use ssh-keygen to generate SSH key pairs
- Config file: ~/.ssh/config for saving connection settings