Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A shell script to upload SSH keys to remote machines' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A shell script to upload SSH keys to remote machines
Authored by: patniemeyer on Sep 19, '07 03:34:52PM

This is nice, but my main problem is figuring out how to export my keys to different flavors for different machines... it drives me batty. I need to go from OSX to various linux and freebsd machines and it never seems to be as easy as I expect. I RTFM, import / export the public keys, fiddle with things and half the time can never get it to work with no indication as to why. I try running the ssh client in super-debug mode and it spits out a lot of things its trying, but that's usually not what I need (the server side of the story).

I wish there were a definitive spec somewhere on how to do this for various machines or a single converter app that reads everything, etc.

thanks,
Pat



[ Reply to This | # ]
A shell script to upload SSH keys to remote machines
Authored by: fungus on Sep 24, '07 02:42:32PM

There is no messy import/export in SSH keys between OSX, BSD, or Linux. They all use OpenSSH, which is the current defacto standard. All that's necessary is to copy the keys over.

When copying the keys it is absolutely critical that the permissions on the files are correct. SSH will ignore keys if permissions are too open. The .ssh directory should not be readable or writable by anyone but you.

drwx------  .ssh/
-rw-------  .ssh/authorized_keys
-rw-------  .ssh/id_dsa
-rw-r--r--  .ssh/id_dsa.pub


[ Reply to This | # ]