When you ssh <machine>
, that machine is added to .ssh/known_hosts
in whatever your home directory is when you connect. This happens on every machine when it first connects with ssh
to another machine. If you want to connect without a password to a given machine, you need to, in every user home directory that will be connecting to every machine, generate a public and private key with ssh-keygen.
For example, if you're using rsa, you would generate the public-private keys with
ssh-keygen -b 1024 -t rsa
and you'll have two files in .ssh: id_rsa
You copy the id_rsa.pub
file to the authorized_keys
file on all the other machines that will connect to this one as this user; that is, you'll have one entry for every machine on your network in known_hosts
and one entry for every machine on your network in authorized_keys
(you don't put the id_rsa.pub
file into the authorized_keys
on "this" machine, only those files from "other" machines).
You said above that you copied the id_rsa
file to another box? If you actually did that, you need to redo as above (copy id_rsa.pub
Hope this helps.