SSH Command Examples: Syntax, Flags, Tunnels, and Keys

Learn the ssh command syntax with practical examples for Linux, macOS, and Windows. Covers ssh -i, ports, tunnels, ProxyJump, config aliases, and debugging.

  • The ssh command connects to remote hosts and supports identity files, custom ports, tunnels, and jump hosts.
  • Use ssh -i to select a specific private key and ssh -v to debug authentication failures.
  • SSH config aliases reduce repeated command-line options for common servers.
Platform Setup Guides
What Is SSH? The Complete Guide to Secure Shell What Is an SSH Key? Public and Private Keys Explained SSH Command Examples: Syntax, Flags, Tunnels, and Keys How to Set Up SSH Keys for GitHub, Linux, Mac, and Windows Generate SSH Key: Online Tool and ssh-keygen Commands ssh-keygen Command: Create SSH Keys with Examples
SSH Key Generator
English 简体中文 繁體中文 日本語 한국어 Español Português Français Deutsch Русский Italiano Nederlands Polski Svenska עברית Dansk Norsk हिन्दी Tiếng Việt Türkçe Indonesia Suomi Українська العربية ไทย Română Čeština বাংলা Ελληνικά Magyar
Resources
GitHub SSH Docs GitLab SSH Docs SSH Academy SSH Cheat Sheet
SSH Command Examples: Syntax, Flags, Tunnels, and Keys SSH Key Generator: Generate SSH Keys Online