2019-11-25 11:18:05 +03:00
|
|
|
## SSH Connections
|
|
|
|
|
|
|
|
wezterm uses libssh2 to provide an integrated SSH client. The
|
|
|
|
client can be used to make ad-hoc SSH connections to remote hosts
|
|
|
|
by invoking the client:
|
|
|
|
|
2020-04-07 02:32:16 +03:00
|
|
|
```bash
|
2019-11-25 11:18:05 +03:00
|
|
|
$ wezterm ssh wez@my.server
|
|
|
|
```
|
|
|
|
|
|
|
|
(checkout `wezterm ssh -h` for more options).
|
|
|
|
|
|
|
|
When invoked in this way, wezterm may prompt you for SSH authentication
|
|
|
|
and once a connection is established, open a new terminal window with
|
|
|
|
your requested command, or your shell if you didn't specify one.
|
|
|
|
|
|
|
|
Creating a new tab will create a new channel in your existing session
|
|
|
|
so you won't need to re-authenticate for additional tabs that you
|
|
|
|
create.
|
|
|
|
|
|
|
|
SSH sessions created in this way are non-persistent and all associated
|
|
|
|
tabs will die if your network connection is interrupted.
|
|
|
|
|
|
|
|
Take a look at [the multiplexing section](multiplexing.html) for an
|
|
|
|
alternative configuration that connects to a remote wezterm instance
|
|
|
|
and preserves your tabs.
|
2021-03-29 17:46:14 +03:00
|
|
|
|
2021-04-04 21:18:08 +03:00
|
|
|
*Since: 20210404-112810-b63a949d*
|
2021-03-29 17:46:14 +03:00
|
|
|
|
|
|
|
wezterm is now able to parse `~/.ssh/config` and `/etc/ssh/ssh_config`
|
|
|
|
and respects the following options:
|
|
|
|
|
|
|
|
* `IdentityFile`
|
|
|
|
* `Hostname`
|
|
|
|
* `User`
|
|
|
|
* `Port`
|
|
|
|
* `ProxyCommand`
|
|
|
|
* `Host` (including wildcard matching)
|
|
|
|
* `UserKnownHostsFile`
|
|
|
|
* `IdentitiesOnly`
|
|
|
|
|
2021-05-01 18:53:51 +03:00
|
|
|
All other options are parsed but have no effect. Notably, neither `Match` or
|
|
|
|
`Include` will do anything.
|
2021-03-29 17:46:14 +03:00
|
|
|
|
2021-05-03 02:13:32 +03:00
|
|
|
*Since: 20210502-154244-3f7122cb:*
|
2021-05-01 18:53:51 +03:00
|
|
|
|
|
|
|
`Match` is now recognized but currently supports only single-phase (`final`,
|
|
|
|
`canonical` are not supported) configuration parsing for `Host` and
|
|
|
|
`LocalUser`. `Exec` based matches are recognized but not supported.
|
|
|
|
|
2021-05-29 10:19:21 +03:00
|
|
|
*Since: nightly builds only:*
|
|
|
|
|
|
|
|
`Include` is now supported.
|
|
|
|
|
2021-05-01 18:53:51 +03:00
|
|
|
### CLI Overrides
|
|
|
|
|
|
|
|
`wezterm ssh` CLI allows overriding config settings via the command line. This
|
|
|
|
example shows how to specify the private key to use when connecting to
|
|
|
|
`some-host`:
|
2021-03-29 17:46:14 +03:00
|
|
|
|
|
|
|
```bash
|
|
|
|
wezterm ssh -oIdentityFile=/secret/id_ed25519 some-host
|
|
|
|
```
|