You can setup .ssh/config
to skip the various prompts when ssh-ing into a remote host.
Host www.example.com
HostName actual.host.name
User username
IdentityFile ~/.ssh/my-other-key.pem
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Port 2222
Notes:
Host
can be a shorthand alias (if you specify the HostName
)Host
can have wildcardsHost
can be an IP address (also with wildcards), but only if you use @ip to loginUserKnownHostsFile
and StrictHostKeyChecking
should only be off for transient (“cattle”) servers