Command of the Day

ssh-copy-id , I hate myself for only finding out about this command 2 days ago and painlessly copying my ssh key to hosts in such a crappy manual method. I'm embarrassed I didn't even bother scripting the process before finding out about this command.

From man page...

ssh-copy-id - install your public key in a remote machine's autho-
rized_keys


2 comments:

Anonymous

February 24, 2009 at 7:48 AM

I end up using 'ssh-keygen -R (host)' a lot. That removes the entry from your known_hosts file for the specified host. This is useful if you have many entries in known_hosts and one of them changes, or if your known_hosts file is hashed and thereby difficult to edit by hand. This comes up for me a lot at work where we constantly have VMs coming up and down with the same IP address.

anonymouscoward

February 24, 2009 at 10:59 AM

Interesting, I normally just do vi .ssh/known_hosts and then :line# and dd the line, to remove the offending key. I run into the same problem you have with the VMS