First, avoid close Login
(1) Public key configuration
ssh-keygen
(2) allows a remote server to remember the public key
ssh-copy-id user name @ip address or domain name
Second, set the alias
(3) Create and edit config files under ~ / .ssh directory
vim config(centos)
vim config(ubuntu)
(4) config file contents
Host Host name
HostName ip address
User Username
Port Port
Annex: ssh-keygen command input after all the way round to
After alias setup is complete, you can log in using ssh + free dense hostname