ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error hostname
Posted: Tue Aug 22, 2017 2:36 pm
I have Nagios XI installed (Virtual Box & import image)and want to monitor remote Redhat 7.x machine using SSH. Installing the agent is likely not allowed in our environment.
This is from Nagios instruction from page 3: https://assets.nagios.com/downloads/nag ... ng_SSH.pdf
For the called check_by_ssh to work you must now copy the public key file of the nagios user on the Nagios XI server to the
authorized_keys file for the nagios user on the remote Linux/Unix server. Continuing with the terminal session from the previous
step execute the following command:
ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip
So when I use this command, using the remote ip address, but I get an error message "ssh: could not resolve hostname /home/nagios/.ssh/id_rsa.pub: Name or service not known."
However, I can ssh to this target host using the ip address from Nagios XI server and successfully logon using the user account "nagios".
What is causing this error?
thanks.
This is from Nagios instruction from page 3: https://assets.nagios.com/downloads/nag ... ng_SSH.pdf
For the called check_by_ssh to work you must now copy the public key file of the nagios user on the Nagios XI server to the
authorized_keys file for the nagios user on the remote Linux/Unix server. Continuing with the terminal session from the previous
step execute the following command:
ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip
So when I use this command, using the remote ip address, but I get an error message "ssh: could not resolve hostname /home/nagios/.ssh/id_rsa.pub: Name or service not known."
However, I can ssh to this target host using the ip address from Nagios XI server and successfully logon using the user account "nagios".
What is causing this error?
thanks.