diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-22 13:51:31 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2021-02-22 13:51:31 -0700 |
commit | 784a7d1d85c0ec4e41b4db7d0862e77cb435806b (patch) | |
tree | 971a161baea67814bfbc209ebd0ad017557df376 /src/connection/ssh.lisp | |
parent | 32c203b02bd082a6c69be062a005b4649813b882 (diff) | |
download | consfigurator-784a7d1d85c0ec4e41b4db7d0862e77cb435806b.tar.gz |
attempt to fix escaping in SSHCMD
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection/ssh.lisp')
-rw-r--r-- | src/connection/ssh.lisp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/connection/ssh.lisp b/src/connection/ssh.lisp index bf6531a..d9dc59e 100644 --- a/src/connection/ssh.lisp +++ b/src/connection/ssh.lisp @@ -43,9 +43,12 @@ (defun sshcmd (connection &rest args) ;; wrap in 'sh -c' in case the login shell is not POSIX - (format nil "ssh ~A sh -c ~A" + (format nil "ssh ~A ~A" (ssh-host connection) - (escape-sh-token (if (cdr args) (escape-sh-command args) args)))) + (escape-sh-token + (format nil "sh -c ~A" + (escape-sh-token + (if (cdr args) (escape-sh-command args) (car args))))))) (defmethod connection-run ((c ssh-connection) cmd &optional input) (run :input input (sshcmd c cmd))) |