After installing a server, I want it to connect to a remote host and add its host key to ssh without asking for confirmation, inside a script. Can I do so by passing the expected fingerprint to the client?
ssh-keyscan <Server_Hostname_or_ip_address> >> ~/.ssh/known_hosts
more options here
2 years ago