Configure SSH for fast logins to remote hosts


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 wildcards
  • Host can be an IP address (also with wildcards), but only if you use @ip to login
  • UserKnownHostsFile and StrictHostKeyChecking should only be off for transient (“cattle”) servers

Date: 2020-04-23

Tags:  openssl

Share: