On 11/29/2013 08:12 AM, cagsm wrote:
Can I copy over the older keys to the new machine? Any best practices when migrating these kind of things? Also the key files inside seem to have thei original hostname included when the sshd generated these private keys, will that not give errors on the differently named machine with a different hostname?
Your user keys, known_hosts, and authorized_keys files are in /home/$user/.ssh. You can simply copy (or rsync) the keys from old-box to new-box for each user. Specifically under each /home/$user/.ssh dir you will find (among other files): authorized_keys # contains public keys from other (remote) computers config # (optional) file containing host/port connection information id_dsa # user private key id_dsa.pub # user public key know_hosts # host keys for computers you connect to Simply copy or (rsync -av) the files from old to new computer. NOTE the file permissions on config and private keys. The MUST be 0600 or an error will be generated. Your host keys from the old box can be moved in the same manner. The are located in /etc/ssh. You will want to see the full discussion at: https://www.ibm.com/developerworks/community/blogs/brian/entry/ssh_host_keys... Bottom line, you can simply copy what you want to preserve and regenerate what you don't. Lastly, the extraneous hostname information following the == in the public/private user keys is ignored for connection purposes. It makes no difference. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org