Repository navigation
New guide: Reach your Herdr agents from anywhere. Leave agents running in Herdr on a machine at home, and reach them from a phone or another laptop with upterm as the door. The forced-command, terminal-reset, open-session and jump changes below serve it.
Behaviour changes
- A guest's forced command (
--force-command) is hung up when its guest leaves or the session ends, rather than killed at once: SIGHUP, then its terminal is closed, then SIGTERM, then SIGKILL, a second apart (about 4 s at worst). A session that ends waits up to about 7 s for its forced commands. On Windows the command is still killed at once. - A forced command keeps running when its guest's input ends, with or without
--read-only.ssh -ttwith a closed or piped stdin now gets the command's whole output and its exit status, where it used to get little or nothing. - Guests are sent a terminal reset when the session or their forced command ends.
upterm attachalso resets kitty's keyboard protocol and modifyOtherKeys on detach and on~^Z, and a guest orupterm attachjoining a session has those modes replayed to it. - A session started with
--acceptand no--authorized-keysor--authorized-useris open: anyone with the session ID can join.upterm hostwarns about it on stderr,session infoand the banner showAccess: open: anyone with the session ID can join, andsession info -o jsonandupterm host --detach -o jsoncarry"open": true. - A guest connection's forwards (a jump,
ssh -Jor-L) are listed asjump … → host:portinsession infoand its notifications, apart from the guest's terminal or SFTP entry, and the leave notification names every destination. Destinations are hidden under--hide-client-ipand in CI.guestCountstill counts these entries, and an older CLI shows them asguest. - A guest turned away by another relay node is told why: its session channel is rejected with
upstream has no session,upstream can't look up sessionsorupstream refused the key, where it used to getssh: unable to authenticate with the upstreamfor all three. A self-hosted relay needs every node on 0.37.0 for this: an older node reports the old text, or passes the new one on unchanged. upterm session currentexits 4 outside a session ($UPTERM_ADMIN_SOCKETunset, or nothing answers at it): silently with-o, as a shell prompt calls it, and otherwise with one line. It used to print its usage and exit 1. The README's prompt recipes check$UPTERM_ADMIN_SOCKETfirst.
New
- A guest's forced command gets sshd-style
SSH_CONNECTION,SSH_CLIENTandSSH_TTYfor that guest's connection, and no longer inherits the host's own.--hide-client-ip, and CI, leave outSSH_CONNECTIONandSSH_CLIENT. Behind a relay older than 0.37.0 the command gets onlySSH_TTY, and on Windows it gets noSSH_TTY.
Fixes
upterm hostreads known_hosts on every host-key check. On an SSH rekey it no longer re-prompts mid-session or, under--skip-host-key-check, appends the key again. A relay first trusted in that run, dialled by an address its certificate doesn't name, is refused at the rekey rather than at the next redial. Adding a key no longer glues it onto a last line that has no newline.- A guest carried by one relay node to another that turns it away now always gets the reason; some such joins used to end with
ssh: unexpected packet in response to channel open: <nil>.
Compatibility
- Old and new hosts, relays, CLIs and daemons mix.
AuthRequestgainslocal_addr, and the admin API gainsGetSessionResponse.open, the client kindFORWARD,Client.forward_destinationsandClient.unlisted_forwards, all optional.
uptermd.upterm.dev already runs 0.37.0.
Changelog
- eb77e38: feat(host): tell a guest's forced command it is that guest's SSH session (#620) (@owenthereal)
- f3c9966: feat(server): say why another relay node turned a guest away, and split attach and the relay-key check for upterm join (#628) (@owenthereal)
- 631a1d5: feat: show a jump through the session as one, and where it goes (#625) (@owenthereal)
- 27ef4d7: feat: warn when a session is open, and say so in session info (#624) (@owenthereal)
- 3eefed6: fix(cli): exit 4 quietly from 'session current' outside a session, and check $UPTERM_ADMIN_SOCKET in the prompt recipes (#619) (@owenthereal)
- 047e835: fix(host): hang up a guest's forced command rather than kill it, and put guests' terminals back when it or the session ends (#621) (@owenthereal)
- 39e819c: fix(host): keep a forced command running when its guest's input ends (#622) (@owenthereal)
- 4d2a287: fix(server): pass on a rejection from a relay node that disconnects at once (#629) (@owenthereal)