Programming How do I fix SSH connect attempt to remote server unsuccessful; cannot locate remote host

  • Please we urge all unregistered users to swiftly register to enable you enjoy loads of benefits rollingout in our community. Be open to opportunities to do good for someone else today. Anything that do not please God in your life has come to distroy you.
banner
Programming related thread

AdServersite

Member
Premium User
Nov 24, 2023
173
0
16
33
Abuja Nigeria

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.
 

BSF For Soul Wining Support Donation

Total amount
$0.00
Goal
$1,000.00
Donation ends: