in reply to Re^2: back tick to do ssh
in thread back tick to do ssh
Hi convenientstore,
Enclose the command you want to be executed on the remote host in quotes, like this:
my $result = `ssh host1 'echo something | /bin/others'`;
This way echo something | /bin/others will be run on host1 and the result will end up in $result.
In Section
Seekers of Perl Wisdom