2021-12-03 19:00:57 +03:00
|
|
|
wezterm uses an embedded ssh library to provide an integrated SSH client. The
|
2019-11-25 11:18:05 +03:00
|
|
|
client can be used to make ad-hoc SSH connections to remote hosts
|
2021-12-03 19:00:57 +03:00
|
|
|
by invoking the client like this:
|
2019-11-25 11:18:05 +03:00
|
|
|
|
2023-03-16 06:54:02 +03:00
|
|
|
```console
|
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.
|
|
|
|
|
2021-12-03 19:00:57 +03:00
|
|
|
Creating new tabs or panes will each create a new channel in your existing
|
|
|
|
session so you won't need to re-authenticate for additional tabs that you
|
2019-11-25 11:18:05 +03:00
|
|
|
create.
|
|
|
|
|
|
|
|
SSH sessions created in this way are non-persistent and all associated
|
|
|
|
tabs will die if your network connection is interrupted.
|
|
|
|
|
2023-03-16 05:22:51 +03:00
|
|
|
Take a look at [the multiplexing section](multiplexing.md) for an
|
2019-11-25 11:18:05 +03:00
|
|
|
alternative configuration that connects to a remote wezterm instance
|
|
|
|
and preserves your tabs.
|
2021-03-29 17:46:14 +03:00
|
|
|
|
2021-12-03 19:00:57 +03:00
|
|
|
The [ssh_backend](config/lua/config/ssh_backend.md) configuration can
|
|
|
|
be used to specify which ssh library is used.
|
|
|
|
|
2023-03-21 08:01:24 +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`
|
2022-04-14 23:55:18 +03:00
|
|
|
* `BindAddress`
|
2021-03-29 17:46:14 +03:00
|
|
|
|
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
|
|
|
|
2023-03-21 08:01:24 +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.
|
|
|
|
|
2023-03-21 08:01:24 +03:00
|
|
|
{{since('20210814-124438-54e29167:')}}
|
2021-05-29 10:19:21 +03:00
|
|
|
|
|
|
|
`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
|
|
|
|
```
|
2021-12-03 19:00:57 +03:00
|
|
|
|