Since Mac OS is very similar to UNIX-based operating system terminals and Linux, it is not possible to remotely log on to a Linux server without the use of Windows-like putty and CRT tools, requiring a simple 3-step password-free SSH remote.
1: Generate the key. Under Mac Terminal, execute the following command:
SSH-KEYGEN-T RSA
The default is to press ENTER on the line, do not have to make other changes, after execution will generate two files, a public key, a private key.
LS ~/.ssh
#id_rsa (private key) id_rsa.pub (public key)
2: Place the public key to the server that needs to be remote.
SCP ~/.ssh/id_rsa.pub User @:/home/user/.ssh/, or can be copied to/root/.ssh
3: Log on to the remote server
CD ~/.ssh
CAT/user root/.ssh/id_rsa.pub >> authorized_keys #将公钥内容加入到authorized_keys文件, no, just create one.
4: Change the Authorized_keys permissions
chmod Authorized_keys
----------------------------------------
You can also generate a pair of keys on the remote server, add the public key content to the Authorized_keys file and change the permissions, copy the private key to the terminal that requires the remote server
SSH Password-free login settings under Mac