13 Commits

Author SHA1 Message Date
Anisse Astier
9d10c020d8 ssh: fix shell payload string length (#2)
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.
2018-12-28 16:20:43 +01:00
Michael Stapelberg
05fda29dea scp: don’t error out on directories in the tarball 2018-12-15 14:47:34 +01:00
Michael Stapelberg
c11ed6a015 use ssh.Unmarshal
Thanks to Merovius for the hint.
2018-10-29 18:42:56 +01:00
Axel Wagner
77088e03a7 Forward correct exit status to client (#1) 2018-10-25 12:49:32 +02:00
Michael Stapelberg
a1fd5f6920 ensure processes are killed when client disconnects 2018-07-22 23:04:18 +02:00
Michael Stapelberg
05c84e7002 ssh: run commands through sh -c if sh is present 2018-06-23 16:14:33 +02:00
Michael Stapelberg
b99b39b334 include the breakglass mountpoint in $PATH
That way, users don’t need to use the ./ prefix all the time.
2018-06-23 15:45:50 +02:00
Michael Stapelberg
a8f85f5027 ssh: default to starting "sh" on shell requests instead of erroring
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
2018-06-23 15:44:41 +02:00
Michael Stapelberg
0d8462cfe7 ssh: send exit-status request for successful commands
The crypto/ssh client library requires this.
2018-06-23 15:42:41 +02:00
Michael Stapelberg
6184621747 exec: answer request once command is running 2018-06-11 23:18:11 +02:00
Michael Stapelberg
ae93fa3cab exec: write stderr to SSH stderr channel, not stdout 2018-06-11 23:17:46 +02:00
Michael Stapelberg
8eb60e64b7 use Fatalf 2018-06-11 21:42:45 +02:00
Michael Stapelberg
448a389515 Initial commit 2017-03-04 11:09:10 +01:00