--
ChengguangZhu - 2019-10-10
ssh to a server without input long host name and password every time:
On your own linux system, run the following:
ssh-keygen -f xxx //produce key file xxx and xxx.pub. You can use a password to protect the key, or just leave password empty
ssh-copy-id -i xxx.pub username@server // install the pub key to the server you want to log in. After this command you should be able to find .ssh/authorized_keys on server
cp xxx to .ssh/
make .ssh/config file and add the following lines:
HOST lx //simple name of the server
HostName theServerName
User Username
IdentityFile ~/.ssh/xx
Now, you can log in with " ssh lx". and log in without password.
previously you have to ssh
username@server and input password