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.
ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error hostname
Re: ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error host
Execute the command like this:
Let us know if this resolves your issue,
Code: Select all
ssh-copy-id -i ~/.ssh/id_rsa.pub nagios@remoteip
Re: ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error host
Thanks that worked great.
But why not have your command in the document?
ik
But why not have your command in the document?
ik
Re: ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error host
I've sent the issue to our documentation team.
May we close this topic?
May we close this topic?
Re: ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error host
Yes, please close.
many thanks!
ik
many thanks!
ik
Re: ssh-copy-id ~/.ssh/id_rsa.pub nagios@remoteip error host
Closing this topic as resolved.
Thank you for visiting the Nagios Support Forum!
Thank you for visiting the Nagios Support Forum!