LangStop
ssh
Ready
Editor

Configuration

OpenSSH remote login client

Safety Advisory

Agent forwarding (-A) and trusted X11 forwarding (-Y) expose your credentials to the remote host. Only use these with hosts you fully trust.

Required
Flags & Options

Add flags from the picker below...

Tests

-i
Identity file

Path to the private key file to use for public-key authentication. May be specified multiple times (-i identity_file).

-l
Login user

Specifies the user to log in as on the remote host (-l login_name).

-p
Port

Port to connect to on the remote host (-p port).

-o
SSH option

Pass an option in the format used in ssh_config (-o option). Can be specified multiple times.

-F
Config file

Specifies an alternative per-user configuration file (-F configfile).

-v
Verbose (-v / -vv / -vvv)

Enable verbose mode. Each additional v increases verbosity up to level 3 for detailed debug output.

-q
Quiet mode

Suppress most warning and diagnostic messages (-q).

-L
Local port forward

Forward a local port to the remote side: -L [bind_address:]port:host:hostport (-L).

-R
Remote port forward

Forward a remote port back to the local side: -R [bind_address:]port:host:hostport (-R).

-D
Dynamic (SOCKS) proxy

Open a local SOCKS proxy on the specified port (-D [bind_address:]port).

-A
Agent forwarding

Enable forwarding of the authentication agent connection (-A). Disable with -a.

-X
X11 forwarding

Enable X11 forwarding (-X). Use -Y for trusted forwarding.

-Y
Trusted X11 forwarding

Enable trusted X11 forwarding (bypasses X11 SECURITY extension controls) (-Y).

-N
No remote command

Do not execute a remote command — useful for port forwarding only (-N).

-f
Background before command

Go to background just before executing the remote command. Implies -n (-f).

-n
Redirect stdin from /dev/null

Prevent reading from stdin; required when running in the background (-n).

-T
Disable pseudo-TTY

Disable pseudo-terminal allocation (-T).

-t
Force pseudo-TTY

Force pseudo-terminal allocation, even when no local terminal is present (-t). Use -tt to force on non-interactive sessions.

-M
Master mode (multiplexing)

Place the client into master mode for connection sharing (ControlMaster). Requires ControlPath (-M).

-S
Control socket path

Path to the control socket for connection sharing (-S ctl_path).

-O
Control command

Send the specified control command to the master process (-O ctl_cmd).

-4
Force IPv4

Force SSH to use IPv4 addresses only (-4).

-6
Force IPv6

Force SSH to use IPv6 addresses only (-6).

-b
Bind address

Use the specified address as the source address of the connection (-b bind_address).

-J
Jump host(s)

Connect to the target via the specified jump host(s). Comma-separate multiple hops: user@host1,user@host2 (-J destination).

-W
Forward stdio to host:port

Forward stdin/stdout to host:port over the secure channel (used as a ProxyCommand alternative) (-W host:port).

-G
Print config and exit

Print the configuration that would be used for the given destination, then exit (-G).

-K
GSSAPI authentication

Enable GSSAPI-based authentication and forwarding of credentials to the server (-K).

-e
Escape character

Set the escape character (default: ~). Use "none" to disable the escape character entirely (-e escape_char).

-E
Append debug log to file

Append debug logs to the specified file instead of stderr (-E log_file).

-c
Cipher

Selects the cipher specification to use for the session. Comma-separated list in order of preference (-c cipher_spec).

-m
MAC algorithm

Specifies MAC algorithms in order of preference (-m mac_spec).

Live Output

Command
ssh

PRO TIP:Use -J user@bastion to hop through a jump host without extra config.

UTF-8
LangStop DevTools v1.0.0
;

Linux SSH Command Builder (Online Tool + Complete Guide)

The Linux ssh command (Secure Shell) is a core utility used to securely connect to remote systems, execute commands, and transfer data over encrypted connections. This SSH Command Builder helps you generate accurate, production-ready SSH commands instantly.


🚀 What is the SSH Command?

The ssh command allows you to:

  • Connect to remote servers securely
  • Execute remote commands
  • Transfer files (via SCP/SFTP)
  • Set up secure tunnels and port forwarding

⚙️ Basic Syntax

ssh [options] user@host

Example

ssh ubuntu@192.168.1.10

🧠 How to Use This SSH Command Builder

This tool enables you to:

  • Enter username and host
  • Configure authentication options
  • Add advanced flags (port, key, forwarding)
  • Generate a ready-to-use SSH command

Workflow

  1. Enter host (IP or domain)
  2. Add username
  3. Configure options (port, key, flags)
  4. Copy and run command in terminal

🔧 Common SSH Options

Specify Username

ssh user@host

Use Custom Port

ssh -p 2222 user@host
  • -p → specify port

Use Private Key Authentication

ssh -i ~/.ssh/id_rsa user@host
  • -i → identity file (private key)

Enable Verbose Output

ssh -v user@host
  • Useful for debugging connection issues

Execute Remote Command

ssh user@host "ls -la"

Local Port Forwarding

ssh -L 8080:localhost:80 user@host
  • Forward local port to remote server

Remote Port Forwarding

ssh -R 9090:localhost:3000 user@host

Dynamic Port Forwarding (SOCKS Proxy)

ssh -D 1080 user@host

📊 Practical Examples

Connect to Remote Server

ssh root@server.com

Connect Using Key + Port

ssh -i ~/.ssh/key.pem -p 2222 ubuntu@server.com

Run Command Remotely

ssh user@host "df -h"

Setup Local Tunnel

ssh -L 3000:localhost:3000 user@host

🧩 Common Use Cases

🌐 Remote Server Access

  • Connect to cloud servers (AWS, VPS, etc.)

🔐 Secure Communication

  • Encrypt data over insecure networks

⚙️ DevOps & Deployment

  • Execute scripts remotely
  • Manage infrastructure

🔗 Tunneling & Proxies

  • Securely forward traffic between systems

⚡ Performance Tips

  • Use SSH keys instead of passwords
  • Enable connection reuse:
    • ControlMaster, ControlPersist
  • Use compression:
    • -C for faster transfers on slow networks

⚠️ Common Mistakes

  • Incorrect permissions on private key:
    • Fix with: chmod 600 key.pem
  • Using wrong port
  • Firewall blocking SSH (port 22 or custom)
  • DNS issues with hostname

🔍 ssh vs scp vs sftp

Tool Purpose
ssh Remote access
scp File copy
sftp Interactive file transfer

❓ FAQ

What does SSH do in Linux?

  • It securely connects your system to a remote machine.

Why is SSH connection refused?

  • Possible reasons:
    • SSH service not running
    • Firewall blocking port
    • Wrong port or host

What is SSH key authentication?

  • A secure method using public/private key pairs instead of passwords.

Is SSH secure?

  • Yes, it uses encryption to protect communication.

🧠 Pro Tips

  • Use ~/.ssh/config to simplify commands:
Host myserver
  HostName 192.168.1.10
  User ubuntu
  Port 2222

Then connect with:

ssh myserver

🔗 Related Linux Commands

  • scp → secure file copy
  • sftp → secure file transfer
  • rsync → efficient file sync

🏁 Summary

The Linux ssh command is:

  • 🔐 Secure and reliable
  • 🌐 Essential for remote access
  • ⚙️ Powerful for DevOps workflows

Use this SSH Command Builder to generate accurate commands instantly and streamline remote operations.