[noctool-cvs] CVS source

imattsson imattsson at common-lisp.net
Fri Sep 4 18:51:42 UTC 2009


Update of /project/noctool/cvsroot/source
In directory cl-net:/tmp/cvs-serv18971

Modified Files:
	utils.lisp 
Log Message:
IM

Added a function that almost (though alas not quite) mimics run-ssh-command
and friends, but using the noctool-ssh libssh2 wrapper.


--- /project/noctool/cvsroot/source/utils.lisp	2009/02/17 17:48:20	1.14
+++ /project/noctool/cvsroot/source/utils.lisp	2009/09/04 18:51:42	1.15
@@ -61,6 +61,13 @@
 		   ,command)))
     (run-command command)))
 
+(defun make-ssh-lib-command (command host &key (user "none") (port 22) password)
+  (let ((session (noctool-ssh:ssh-connect host user :port port :password password)))
+    (noctool-ssh:make-channel session :command command)
+    (let ((string (noctool-ssh:ssh-read session)))
+      (noctool-ssh:ssh-close session)
+      (make-string-input-stream string))))
+
 (defun ping-helper (key string)
   (let ((start (search key string)))
     (when start





More information about the noctool-cvs mailing list