Welcome! 登入 註冊
美寶首頁 美寶百科 美寶論壇 美寶落格 美寶地圖

Advanced

Make SSH Login without Password and Troubleshot it

Posted by mepoadm 
Make SSH Login without Password and Troubleshot it

分類標籤: Linux系統管理
1. Generate Key Pair
Shell> ssh-keygen
Do not enter the passphrase and your will see:
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.
2. Copy the Key to the Remote Client
Shell> ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote-domain.com

Basically, it's done.

3. Troubleshoting
(1) Make sure the Home Directory of the remote client is NOT writable by other users.
(2) Check /var/log/messages for error information.