Displaying 1 result from an estimated 1 matches for "ex_ssh".
Did you mean:
essh
2013 Apr 20
3
[Bug 2094] New: Executing commands via ssh on a remote host has different parameter passing properties
...istd.h>
int main(int argc, char** argv) {
execlp(argv[1], argv[1], "a", "a'b", NULL);
return 0;
}
and then compile and run it, the arguments passed to it are printed
out:
$ ex_local /tmp/ap.sh
a
a'b
$
which is correct. If I have this C file ex_ssh.c:
#include <unistd.h>
int main(int argc, char** argv) {
execlp("/usr/bin/ssh", "/usr/bin/ssh", argv[1], argv[2], "a",
"a'b", NULL);
return 0;
}
and run it:
$ ex_ssh somehost.com /tmp/ap.sh
zsh:1: unmatched '
then /tmp...