Basic SSH Usage
Connect to a remote host directly from the command line:Connect to Remote Host
How It Works
When you connect viawezterm ssh:
- WezTerm establishes an SSH connection to the remote host
- A new terminal window opens with your session
- New tabs/panes created from this window reuse the same SSH connection
- 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
| SSH Config Option | Supported |
|---|---|
Host | ✓ |
Hostname | ✓ |
User | ✓ |
Port | ✓ |
IdentityFile | ✓ |
IdentityAgent | ✓ |
IdentitiesOnly | ✓ |
ProxyCommand | ✓ |
ProxyUseFDpass | ✓ (not on Windows) |
UserKnownHostsFile | ✓ |
BindAddress | ✓ |
ServerAliveInterval | ✓ (libssh backend) |
Include | ✓ |
Match | Partial (Host and LocalUser only) |
Example SSH Config
~/.ssh/config
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
| Feature | Libssh | Ssh2 |
|---|---|---|
| ServerAliveInterval | ✓ | ✗ |
| ProxyUseFDpass | ✓ | ✗ |
| Stability | High | High |
| Performance | Good | Good |
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
- Establishes SSH connection to the remote host
- Starts or connects to the WezTerm multiplexer daemon on the remote
- Attaches tabs through a Unix domain socket over SSH
- 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 respectsIdentityAgent 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
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
| Feature | WezTerm SSH | OpenSSH | PuTTY |
|---|---|---|---|
| Config file support | ✓ | ✓ | Partial |
| Tab multiplexing | ✓ | ✗ | ✗ |
| Native GUI | ✓ | ✗ | ✓ |
| Session persistence | ✓ (with domains) | ✗ | ✗ |
| Cross-platform | ✓ | ✓ | Windows only |
| Key agent support | ✓ | ✓ | ✓ |