There is a file containing host keys from remote computers at ~/.ssh/known_hosts
These host keys are automatically stored during the first (manual) login.
After installation of a new system at the remote site, the remote site's host key has
changed and needs to be deleted from ~/.ssh/known_hosts at the local host. The new key
will automatically be stored during the first (manual) login.
To set up a user key for login without a password (this is also required for remote scripts
to scp data to the local site), execute the following commands:
Log in at remote site and create a key pair, e.g. ssh wera@remote.domincd .sshssh-keygen -t rsa
[this generates a keypair at ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub]
Copy the public key to the local site, e.g. scp id_rsa.pub wera@local.domin:~/remote.pub
Log off the remote site.
At local site, append the remote site's public key to ~/.ssh/authorized_keys, e.g. cat remote.pub >> ~/.ssh/authorized_keys