1. Host Server
ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
aa:bb:11:5a:6d:66:76:ee:e2:4c:9b:5d:3d:db:68:f5 root@$HOSTNAME
cd .ssh/
ls
scp id_rsa.pub $USER@$CLIENT_SERVER:.ssh/authorized_keys
2. Remote Server
chmod 755 ~/.ssh
chmod 644 .ssh/authorized_keys
1에서 2로 접속해보면 끝.