Files
Evan Simkowitz 6e867c8099 remove heading
2024-12-24 17:47:10 -05:00

41 lines
3.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: 'Connections'
description: 'Run commands on remote machines'
icon: 'map'
---
<Warning>
As of September 2024, this version of Wave Terminal is deprecated. To learn more about our new version (>=v0.8.0), check out [www.waveterm.dev](https://www.waveterm.dev). To find documentation for our new version, check out [docs.waveterm.dev](https://docs.waveterm.dev).
</Warning>
## Connections
Wave enhances SSH by offering connections that stay alive across sessions, maintaining your environment and history, unlike traditional SSH that might disconnect and lacks universal command history. Setting up a Wave connection creates a resilient virtual SSH connection, preserving your session details and command logs.
### Security
> Wave was designed with security in mind. It uses standard SSH for all remote machine authentication, without relying on any proprietary authentication schemes. Communication is exclusively handled through stdout and stdin, ensuring that the helper running on the remote machine _never_ has to open any ports or require additional privileges.
To set up a new connection, navigate to "Connections" on the left sidebar and click "New Connection". Fill out the required _user_ and _host details_, then select your "Auth Mode".
<img height="200" src="/images/connections.gif" />
Wave utilizes standard SSH, offering the choice of an SSH key (akin to "-i") or a password for authentication—SSH keys are favored for their increased security. For unique authentication needs or OTP, switch "connectmode" to "manual".
<Tip>
To ensure persistent connections, Wave installs a helper (waveshell) on the remote machine. This helper communicates with Wave via _stdin_ and _stdout_, requiring no extra permissions, opening no ports, and writing to disk only for detached commands. Waveshell is open-source, written in Go, and can be found in the waveterm [GitHub repo](https://github.com/wavetermdev/waveterm/tree/main/waveshell) in the _waveshell_ directory. To reinstall, use `/connection:install`.
</Tip>
## Importing SSH Configurations
To simplify setting up your connections, Wave let's you import your existing SSH configurations using the [Import Config](/features/sshconfig-imports) feature, avoiding the need to manually recreate connections. To access this feature, select the "Connections" button in the left-hand sidebar and then select "Import Config."
**Note:** This feature can also be invoked from the CLI directly by running `/remote:parse` ([reference](/reference/slashcommands#remote-parse))
### Using Connections
Once a Wave connection is established, switching between connections is simple. Use the `cr` command, akin to `cd` in functionality, by typing `cr [remotename-or-alias]`. Your prompt updates, indicating youre executing commands on the selected connection, allowing for a blend of local and remote commands.
Each session and tab can switch to new connections with `cr`, maintaining their unique remote states—including different working directories—mirroring local session behavior.
For instance, executing `cr server01` places you in server01's environment. Operations like `cd` or setting variables are specific to that tab. To initiate another environment within the tab, `cr server01:2` generates a separate workspace "2". This setup permits multiple, isolated environments for each remote within a tab.
To reset a remote to its initial login state use the `/reset` command. This can be useful after updating your `.bashrc`, `.zshrc` or similar.