Skip to main content
WezTerm includes an embedded SSH client library that provides an integrated SSH experience with native terminal multiplexing support. You can connect to remote hosts without installing a separate SSH client, and new tabs automatically reuse existing connections.

Basic SSH Usage

Connect to a remote host directly from the command line:
Connect to Remote Host

How It Works

When you connect via wezterm ssh:
  1. WezTerm establishes an SSH connection to the remote host
  2. A new terminal window opens with your session
  3. New tabs/panes created from this window reuse the same SSH connection
  4. No re-authentication required for additional tabs
SSH sessions created with wezterm ssh are non-persistent. If your network connection is interrupted, all associated tabs will close. For persistent sessions, see the multiplexing domains section below.

SSH Config File Support

WezTerm reads and respects your SSH configuration from:
  • ~/.ssh/config
  • /etc/ssh/ssh_config

Supported Options

Example SSH Config

~/.ssh/config
Connect using the alias:
Use Config Alias

Command-Line Overrides

Override SSH config settings from the command line:
CLI Overrides

SSH Backends

WezTerm supports multiple SSH backend implementations:
Configure SSH Backend

Backend Comparison

Multiplexing Domains

For persistent SSH sessions that survive network interruptions, configure SSH multiplexing domains. This requires WezTerm to be installed on both local and remote hosts.

Configuring SSH Domains

SSH Domain Configuration

Connecting to SSH Domains

Connect to Multiplexing Domain
This:
  1. Establishes SSH connection to the remote host
  2. Starts or connects to the WezTerm multiplexer daemon on the remote
  3. Attaches tabs through a Unix domain socket over SSH
  4. Persists sessions even if network connection drops

Auto-Generated Domains

SSH domains are automatically created from your ~/.ssh/config:
  • Plain SSH: Prefix SSH: (e.g., SSH:myserver)
  • Multiplexing: Prefix SSHMUX: (e.g., SSHMUX:myserver)
Auto-Generated Domains

Authentication

SSH Key Authentication

Recommended for security and convenience:
Generate SSH Key

SSH Agent

WezTerm respects IdentityAgent configuration:
SSH Agent Config

Advanced Configuration

Jump Hosts / Bastion

Bastion Configuration

Connection Keepalive

Keep Connection Alive
ServerAliveInterval is supported by the libssh backend. ServerAliveCountMax is not currently supported.

Multiple Identity Files

Multiple Keys

Troubleshooting

Connection Timeout

Increase Timeout

Authentication Failures

1

Check SSH key permissions

Ensure private keys have correct permissions: chmod 600 ~/.ssh/id_ed25519
2

Verify SSH agent

Check if agent is running: ssh-add -l
3

Test connection

Try standard SSH client first: ssh -v user@hostname
4

Check known_hosts

Remove old host keys if host was reinstalled: ssh-keygen -R hostname

Remote WezTerm Not Found

For SSH multiplexing domains, specify the remote WezTerm path:
Remote WezTerm Path

Use Cases

Development Workflow

Dev Server Connection

System Administration

Multi-Host Management

Remote Development

Remote Coding

Comparison to Other SSH Clients