Best, secure way to ssh without needed password?

Hi,

Wondering if anyone could suggest the best way to complete this.

I have a remote server that hosts a forum what i want to finish configuring my monitoring via Nagios. now because my home network uses a Dynamic IP nagios fails to work once the IP changes.

Another way to run the checks is possibly via "check by ssh" which ssh's to the machine and runs the required command.

what is the best secure way for my monitoring server to ssh to the remote server without using passwordless keys?

Monitoring server is running Centos but will be changing to debian
remote server is running Debian

i also have full access to both servers and also a "dedicated" nagios user.

Thanks

I think you can solve that without resorting to password injection.

Check the IP address of the server with a utility like ping or nslookup before you login, then add it to your known_hosts. Perhaps remove the old ones while you're at it so known_hosts doesn't grow endlessly.

There is no good, safe, secure way to inject plaintext passwords into ssh or anything else; this is why the keys mechanism was invented...