github owenthereal/upterm v0.41.0
Upterm 0.41.0

5 hours ago

v0.41.0 lets guests bring their own tools into a session: commands, VS Code Remote-SSH, Herdr, scp and sftp, and port forwards to the host's loopback. Each one is granted for the run or approved in your terminal. A new command prints the ssh config to reach a session by name.

Guest tools

  • Commands. A guest's explicit command (ssh SESSION CMD, VS Code Remote-SSH, herdr --remote) runs privately on your machine, with pipes or its own terminal. It waits for your approval in the host terminal, or runs without asking under --allow-exec. Plain ssh still joins the shared terminal. #709
  • Login program. --login-command chooses what a guest's plain ssh opens instead of the shared terminal. #709
  • Port forwards. Forwards (ssh -L) to literal loopback addresses (127.0.0.0/8 and ::1) wait for approval, or run without asking under --allow-forwarding=loopback. --allow-forwarding=any allows any destination. #710
  • Approvals. Approvals happen in your terminal. ~a opens the oldest request. Answer y, a or n followed by the code it shows. Requests expire after 60 seconds, and a session with no terminal attached denies them. File transfers use the same review instead of desktop dialogs. #708, #724
  • --full-access. It grants commands, file transfers and loopback forwards at once, and requires --authorized-user or --authorized-keys. #723
  • upterm session ssh-config NAME. It prints a ~/.ssh/config block and the relay's known_hosts line, so ssh, scp, sftp and VS Code can reach a session by name. #725
  • --detach. On a terminal, upterm host --detach now asks its start question rather than requiring --accept. #723
  • Reporting. session info, session current and the detached JSON report what guests may do (execution, tcpForwarding, fileTransfer), along with sshConfig. #710, #725
  • Docs. The README's new "Reach your own machine" section and the Herdr guide set up a door to your own machine. #725

Behavior changes

  • Explicit commands. An explicit SSH command (ssh -t … CMD) no longer joins the shared terminal with CMD ignored. It runs CMD privately, after approval or under --allow-exec. --accept doesn't allow it, so a detached --accept session denies it. To join the shared terminal, use plain ssh or upterm join.
  • File transfers. --allow-sftp (or --accept) lets file transfers run without approval when nobody is at the terminal.
  • ~a. The ~a escape is now consumed wherever approval is supported. To send a literal ~a, type ~~a, or change or disable the escape.
  • Deprecated flag. --allow-local-tcp-forwarding is deprecated in favor of --allow-forwarding=any. It still works, and prints a notice when given on the command line. Its config key and environment variable keep working silently.
  • Guest environment. Guest commands no longer inherit the host pane's multiplexer variables: TMUX, TMUX_PANE, STY, ZELLIJ, ZELLIJ_SESSION_NAME, ZELLIJ_PANE_ID, HERDR_ENV, HERDR_PANE_ID, HERDR_SESSION, HERDR_TAB_ID and HERDR_WORKSPACE_ID.
  • Relay answers. upterm host refuses a relay answer whose session ID or SSH user contains anything but letters, digits and ._+=:-. That way a relay can't plant shell syntax in the commands upterm prints for you to paste. A relay's refusal message is shown as plain text. #726

Embedding API

  • Permission types. Import them from host/consent instead of host/sftp. There are no aliases.
  • Permission checker. Replace Host.SFTPPermissionChecker with Host.PermissionChecker, which implements CheckPermission(context.Context, consent.Operation, consent.ClientInfo, ...string) (consent.Decision, error) and ClearConnection(string). A checker must honor the deadline and cancellation, and handle SFTP, exec and forwarding.
  • Built-in approval. Set Host.TerminalConsent = true; it can't be combined with a checker. A nil checker without terminal consent denies anything not granted.
  • New fields. Host.SFTPAutoAccept, and host.RelayKeyCheck with Host.RelayKeyTrusted, which report the relay key a session trusted.

Fixes

  • Guest commands. A guest terminal command whose output was cut off now reports failure. Pending file-transfer and forward approvals now end with the session. #722
  • Tunnels. The relay releases a guest's tunnel when the guest leaves, instead of holding it until the host disconnects. #712
  • Consul. Consul lock releases and the shutdown cleanup now give each attempt its own deadline, so a stalled call no longer stops the retries. #715, #719
  • Relay logs. Clients leaving in the ordinary course of things are logged as warnings, not errors. #713, #714, #716, #717, #718, #720

Self-hosted relays

  • New uptermd options, all opt-in. uptermd can keep a guest's origin across relay hops, serve node-to-node hops on a separate internal listener, require PROXY v2 headers on an SSH listener, and sign hops with a dedicated key. #705, #706, #707
  • Fly. fly.example.toml sets GOMEMLIMIT to keep Go's heap inside the machine. #712
  • Helm. Helm chart 0.2.1 adds authorized-key support. #704

Changelog

Don't miss a new upterm release

NewReleases is sending notifications on new releases.