Re: keying a fresh sshd
Carl Karsten <[email protected]> Thu, 12 Oct 2006 16:08:20 -0500
| Newsgroups | gmane.network.ssh.windows |
|---|---|
| Message-ID | <[email protected]> |
>>> >>> I am re-running the OS install each time - like booting from the CD >>> and doing 'install to first HD, auto partition and mkfs hda1' >>> >>> So there are no "old keys" to overwrite. >> >> Okay, when you said install I was thinking it was the aplication you >> were installing. Okay, in this case you have no options other than >> restoring an old /etc/ssh/ (assuming that is where you put it) over >> the new one after the OS install is complete. >> > > cool. This was my suspicion, but my first attempt failed so just > getting confirmation that it is what I need to do is a big help. > > I just copied the whole dir to another box. I'll reinstall and diff the > new dir to the old and post the results (not that anyone here asked for > them, but may as well for posterity.) > carl@cware1:~$ diff -q a/ssh/ b/ssh/ Files a/ssh/ssh_host_dsa_key and b/ssh/ssh_host_dsa_key differ Files a/ssh/ssh_host_dsa_key.pub and b/ssh/ssh_host_dsa_key.pub differ Files a/ssh/ssh_host_rsa_key and b/ssh/ssh_host_rsa_key differ Files a/ssh/ssh_host_rsa_key.pub and b/ssh/ssh_host_rsa_key.pub differ moved the old files onto the new install, and bingo: carl@amd15:~$ ssh juser@yate2 Warning: the RSA host key for 'yate2' differs from the key for the IP address '192.168.1.18' Offending key for IP in /home/carl/.ssh/known_hosts:27 Matching host key in /home/carl/.ssh/known_hosts:29 Are you sure you want to continue connecting (yes/no)? yes juser@yate2's password: 'good' not sure why the warning, but it lets me log in. I don't mind answering a quick question, it was the "edit a file" process that was driving me nuts. Carl K -- List Info: http://erdelynet.com/ssh-l/ List Archives: http://erdelynet.com/archive/ssh-l/ To Unsubscribe: Mail mailto:[email protected]