Implement certificate authentication, certificate requires :gokrazy: principal
Read first line of /etc/passwd for home and shell
Shell uses `-l` to make it a login shell which will run .profile
This code path requires gokrazy/tools at this commit or newer:
37e2f95c5c
And gokrazy/serial-breakglass at this commit or newer:
bf9bc19235
Afterwards, with an ~/.ssh/config entry like this:
Host scan2drive
ProxyCommand breakglass -proxy %h
…using Emacs TRAMP should just work:
emacs /ssh:scan2drive:/perm/keep/index.md
This means the message will be printed only once when using the breakglass
command line tool (which first copies over a tarball, then logs in).
Also switch to fancy ASCII art while we’re at it :)
Using ssh.Unmarshal since commit c11ed6a015a8da means the "shell" payload should be propely formatted, with a specified string length. Otherwise, when attempting to connect, you'll see this message in the gokrazy stderr:
ssh: parse error in message type 0
that's because in x/crypto/ssh, the parseString() method expects a length before the string. If length is 0, there will be remaining unparsed data, and an error.
This may still result in an error if sh is not present, but in case sh *is*
present, it results in the user just getting a shell without having to use
e.g. ssh -t gokrazy ./busybox sh