Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (29 sloc) 1.07 KB
(import minissh nrepl tweetnacl (chicken tcp) (chicken port) srfi-18))
(else (use minissh nrepl tweetnacl)))
;; the default /dev/random causes hangs
(current-entropy-port (open-input-file "/dev/urandom"))
;; the secret key would normally be kept safe
(define host-pk
(define host-sk
(print "test with: ssh localhost -p 22022 repl # any user, any password")
host-pk host-sk
(lambda (ssh)
(eval `(set! ssh ',ssh))
(userauth-accept ssh password: (lambda _ #t) publickey: (lambda _ #t))
(tcp-read-timeout #f)
(lambda (ch)
(lambda ()
ch (lambda ()
(print "try ssh, (ssh-user ssh), (ssh-user-pk ssh)"
" or (kexinit-start ssh)")
(lambda () (channel-accept ssh)))))