[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Remote host identification has changed!



T o n g wrote:
> - The host that I'm trying to connect to is my test machine, is it 
> possible that I keep both the old RSA host key and add the new one? 
> because for the time being, I need them both.

If the key has changed then the old key is no more.  You might as well
remove it, since it is no longer used.  Why do you need the old one if
the machine has been moved to the new one?

If you are repeatedly installing on your test machine then you might
consider saving and restoring a saved /etc/ssh/* such that your host
keys will be preserved and won't change anymore.

> - I remember that it is possible to answer yes and have ssh automatically 
> add the host key, instead of I do it manually. Is it so, or I remembered 
> wrong?

You can also manually force updating the host key.  The ssh-keyscan
command will retrieve the current host key from the system.

  ssh-keyscan -t rsa somehostname

It is relatively easy to script the updating of the known hosts file
so that the value is updated when you change the host key on a
system.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: