Sure there are - in the config file, and in the command line.
59: `ssh-keygen -q -f ~/.ssh/id_{$server['type']} -t {$server['type']} -N '{$server['remote_pass']}'`;
71: $server['conn']->shell("ssh-keygen -q -f ~/.ssh/id_{$server['type']} -t {$server['type']} -N '{$server['remote_pass']}'");
It gets even better - if you forgot to set REMOTE_PASS in the config file, it defaults to empty, and you end up with a passwordless key on most of your machines: 39: $_SERVERS[$k]['remote_pass'] = ($_SERVERS[$k]['remote_pass']) ? $_SERVERS[$k]['remote_pass'] : '' ;
Even if you're only copying keys "to and from the localhost", you've still just given all your servers access -- likely without a password -- to your desktop computer.The reason for php is simple, I had already wrote the libssh2 code for what I needed. I submitted it, in hopes it saves someone else the time.
Why not generate one key pair on your management host, and then use the standard "ssh-copy-id" command to push the public key out to each managed server?
Using ssh-copy-id is the standard method, but doesn't suite what I wanted.
You say ssh-copy-id doesn't suite what you want, but you could easily create a much shorter script that just loops over the list of server and runs ssh-copy-id.
Here's the Google cache: http://webcache.googleusercontent.com/search?q=cache%3Ahttp%...