in reply to Calling a remote ssh connection from perl
are you sure you are showing us the right code and error message?
This
system("ssh root@remoteIP /usr/bin/ls");
will try to interpolate an array @remoteIP into the double-quoted string
so better either write
system("ssh root\@remoteIP /usr/bin/ls")
or
system('ssh root@remoteIP /usr/bin/ls')
BTW: did you use strict and warnings ?
HTH! :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling a remote ssh connection from perl
by KenHorse (Initiate) on May 27, 2021 at 22:43 UTC | |
by LanX (Saint) on May 27, 2021 at 22:48 UTC |