Terminal sessions and snippets

Each SSH session opens in a tab. Above it, the route bar shows how the session gets to the host and gives you its files and your snippets.

Opening sessions

  • Click a host in the sidebar to connect. Hosts with an open session show a status square in the sidebar.
  • Open as many tabs as you like, also several to the same host.
  • Use Quick connect (the plus at the end of the tab bar) for a host you haven't saved.

Tabs of hosts that use the Production terminal scheme get a red marker and a PROD label, and tabs that are being recorded get a recording marker. See Themes and terminal appearance and Session logs.

The route bar

Above each session, the route bar shows:

  • the VPN, if one carries the connection, and its address once connected;
  • each jump host on the way;
  • the host and the address you're signed in as;
  • the pinned host key's type and a short fingerprint;
  • Recording, when the session is recorded;
  • Files, which opens the host in the SFTP browser;
  • Snippets, which pastes or runs a saved command.

Snippets

A snippet is a command, or several lines of commands, you keep in the vault.

  • Create one with New snippet next to Snippets in the sidebar: a Name, the Commands and optional Tags.
  • In a session, open Snippets in the route bar. Choose a snippet to paste it, or Run to paste it and press Enter.
  • From a snippet's own page, Paste and Run send it to the last terminal you used.

MorphGate pastes with bracketed paste where the remote shell supports it, so a multi-line snippet doesn't run line by line as you paste it.

When a connection drops

If a connection is lost, MorphGate says Connection lost and tries again by itself, after 2, 5, 15 and 30 seconds. If your computer is offline, it waits until the network is back. Retry now skips the wait.

When a session ends any other way, because the remote shell exited or the connection never opened, the tab shows Reconnect. Each reconnect is a new session in the same tab.

Keep the session on the server

With Keep the session on the server (tmux) on in a host's editor, or in its group, each tab attaches to its own tmux session on the host, and creates it if it's missing. A dropped connection, a restart of MorphGate, or the same host opened on another device then picks up where you were.

The host needs tmux installed. Where it isn't, you get a normal shell.

Locking closes sessions

Locking the vault, by hand or after the idle time you set, closes every terminal, file browser, tunnel and VPN. With tmux kept on the server, your work there keeps running and you can attach again. See Unlocking and auto-lock.

On a narrow window

When the window is as narrow as a phone, MorphGate switches to a phone layout: hosts with open sessions on top, a sheet per host with its route, and a full-screen terminal with a row of keys a phone keyboard lacks, such as Esc, Tab, Ctrl and the arrows.