summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorArtyom Poptsov <poptsov.artyom@gmail.com>2014-07-19 18:53:38 +0400
committerArtyom Poptsov <poptsov.artyom@gmail.com>2014-07-19 18:53:38 +0400
commiteb8f4dd8ddccd9bc9a4a74f81a998fbffc509474 (patch)
treed910d50d5ba5d8f408517cb2c1c2d14e8b96cf2a /examples
parenttests/server-client.scm (clnmsg): Fix a bug (diff)
downloadguile-ssh-eb8f4dd8ddccd9bc9a4a74f81a998fbffc509474.tar.gz
tests/sssh-ssshd.scm: Use test `known_hosts' file
* examples/sssh.scm.in (*option-spec*): Add `known-hosts-file' option. (main): Handle it. * tests/sssh-ssshd.scm: Fix a bug in the test suite: use test `known_hosts' file to make sure that it has no records. ("ssshd, start"): Add a delay to make sure that ssshd started. ("sssh, exec"): Improve. Do cleanup at the end of the TC. (*sssh-cmd*): Set `knownhosts' file explicitly.
Diffstat (limited to 'examples')
-rw-r--r--examples/sssh.scm.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/sssh.scm.in b/examples/sssh.scm.in
index 3184f1d..6894a70 100644
--- a/examples/sssh.scm.in
+++ b/examples/sssh.scm.in
@@ -57,6 +57,7 @@
(help (single-char #\h) (value #f))
(version (single-char #\v) (value #f))
(debug (single-char #\d) (value #f))
+ (known-hosts-file (value #t))
(ssh-debug (value #t))))
@@ -139,6 +140,7 @@ Options:
(debug-needed? (option-ref options 'debug #f))
(ssh-debug (option-ref options 'ssh-debug
*default-log-verbosity*))
+ (known-hosts-file (option-ref options 'known-hosts-file #f))
(help-needed? (option-ref options 'help #f))
(version-needed? (option-ref options 'version #f))
(args (option-ref options '() #f)))
@@ -164,6 +166,9 @@ Options:
#:identity identity-file
#:log-verbosity (string->symbol ssh-debug))))
+ (and known-hosts-file
+ (session-set! session 'knownhosts known-hosts-file))
+
(print-debug "3. connect! (ssh_connect_x)\n")
(connect! session)