teleport/lib/sshutils
rosstimothy 53f9537b86
Ensure ssh connection rejection errors are returned (#18658)
* Ensure ssh connection rejection errors are returned

#18302 altered the connection flow which changed the communication
via ssh. Prior to the change an ssh channel was opened first, then
global requests were sent. After the change a global request is sent
prior to opening a channel. This caused users to no longer receive a
human readable rejection message a la: `ssh: rejected: administratively
prohibited (too many concurrent ssh connections for user`, instead only
an `EOF` was returned.

To ensure that the correct message is provided to users two changes are
made, although only the client side change is strictly required.

1) the tracing ssh client now returns any rejected errors cached from
opening the tracing channel

2) the ssh server now processes global requests during it's wait period
waiting for a channel to reject and send the replies to any requests
with said rejection

`TestLockInForce` was updated to include attempting to send a global
request so both scenarios are covered as order should not matter.
2022-11-22 19:09:37 +00:00
..
scp Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
sftp Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
x11 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
authority.go Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
ctx.go Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
ctx_test.go Fix chan_shutdown_read issue (#14736) 2022-07-29 18:47:39 +00:00
fingerprint.go Lint and fix missing license headers (#8075) 2021-08-30 09:44:09 -07:00
forward.go Trace ssh sessions (#14966) 2022-08-04 22:14:37 +00:00
marshal.go Update golangci-lint to 1.49.0 (#16507) 2022-09-19 22:38:59 +00:00
req.go Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
server.go Ensure ssh connection rejection errors are returned (#18658) 2022-11-22 19:09:37 +00:00
server_test.go Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
signer.go Fix compatibility with sshd 7.x (#18181) 2022-11-10 22:50:06 +00:00
tcpip.go Update golangci-lint to 1.49.0 (#16507) 2022-09-19 22:38:59 +00:00