Generating public/private rsa key pair.2. scp ~/.ssh/*.pub 你欲登入的主機:~/.ssh/.
Enter file in which to save the key (/home/username/.ssh/id_rsa): [按 Enter 使用預設值(建議)]
Enter passphrase: 輸入你的 Passphrase
Enter same passphrase again: 再一次輸入你的 Passphrase
Your identification has been saved in /home/username/.ssh/id_rsa.
Your public key has been saved in /home/username/.ssh/id_rsa.pub.
The key fingerprint is: cc:e8:a9:da:a3:41:c6:a9:97:52:59:ef:0c:cf:45:b6 username@abc.com
3. ssh 你欲登入的主機
4. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
5. chmod 711 ~/.ssh
6. chmod 644 ~/.ssh/authorized_keys
發現,用 ubuntu 9.10 完成以上這些動作,就可以直接登入主機,不需在使用 ssh-agent
Reference:
No comments:
Post a Comment