ssh connection remote server tips

Normal, every time you connect to the remote server, you need 1 ssh remotehost; 2 enter the password

In fact, step 1 can be simplified by configuring ~/.ssh/config, for example like this

Host corp
     User user
     Port 22
     ServerAliveInterval 120
     ServerAliveCountMax 30
     IdentityFile ~/.ssh/id_rsa

In the future, you can directly ssh corp without entering lengthy ip addresses.

Second, test your own public key, that is, the things in to the server's ~/.ssh/authorized_keys, and then you don't need to enter the password.

Guess you like