This commit is contained in:
Tony Garnock-Jones 2021-06-19 15:15:18 +02:00
parent 60af9eae09
commit 10e5e2cf91
1 changed files with 9 additions and 12 deletions

View File

@ -52,18 +52,15 @@
(at conn-ds
(once
[(message (ssh-identification-line $remote-identification))
(if (not (regexp-match #rx"^SSH-2\\.0-.*" remote-identification))
(begin
(log-error "Invalid peer identification string ~v" remote-identification)
(stop-actor-system))
(begin
(send! (inbound-credit 1))
(spawn #:name 'session
(ssh-session conn-ds
ground-ds
local-identification
remote-identification
'server))))])
(cond
[(regexp-match #rx"^SSH-2\\.0-.*" remote-identification)
(send! (inbound-credit 1))
(spawn
#:name 'session
(ssh-session conn-ds ground-ds local-identification remote-identification 'server))]
[else
(log-error "Invalid peer identification string ~v" remote-identification)
(stop-actor-system)])])
(during (SshAuthenticatedUser $user-name #"ssh-connection")
(run-repl-instance conn-ds user-name))