Online Linux Terminal Logo
OnlineLinuxTerminal
Networking & TransferCLI Reference

$ssh

Securely log into remote Linux servers and execute commands over encrypted connections.

Syntax DefinitionPOSIX standard
ssh [OPTIONS] [USER@]HOSTNAME [COMMAND]
Linux Community2.4k Online

Chat with real Linux users, learn new commands & get free cheat sheet PDFs.

Try `ssh` Live in Interactive Sandbox

Zero-install client simulation with real-time feedback.

Open in Fullscreen Workspace↗
bash — terminal

Overview & How ssh Works

`ssh` (Secure Shell) is the industry-standard cryptographic network protocol for operating network services securely over an unsecured network. It provides end-to-end encrypted terminal login, remote command execution, and port forwarding.

Common Flags & Command Options

Flag / OptionDescription
-p [port]Port to connect to on the remote server (default is 22).
-i [keyfile]Select private key identity file for public key authentication (e.g., ~/.ssh/id_rsa).
-vVerbose mode for debugging SSH connection and handshake failures.

Practical Real-World Examples

Example #1Connect to remote server using custom key
ssh -i ~/.ssh/id_ed25519 user@remote-server.com

Initiates encrypted SSH session using ED25519 public key authentication.

Frequently Asked Questions

How do you generate an SSH key pair in Linux?

Run `ssh-keygen -t ed25519 -C "your_email@example.com"` and follow the prompts to create your key in `~/.ssh/`.