SSH connect attempt to remote server unsuccessful; cannot locate remote host
The following command works perfectly from the Linux command line when using Linux and the remote ssh command (I've set my public ssh key on the remote server to enable connects without a password prompt):
root@remoteIP via ssh /usr/bin/ls
Nevertheless, when my Perl script calls the following:
system("ssh root@remoteIP /usr/bin/ls");
Perl summaries:
Hostname root could not be resolved via SSH.remoteIP: Unknown name or service
(RemoteIP is the remote computer's actual IP address. Naturally, I have to instruct Perl on how to resolve the address.