hosta和hostb都必须同步完成以下操作,以hosta为例 ================================================================ 1、创建密钥对,两台都做 [root@hosta /]# who am i root pts/1 2008-04-30 12:08 (172.16.10.220) [root@hosta /]# cd ~/.ssh [root@hosta .ssh]# ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/root/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_dsa. -------私钥名一定要叫id_dsa Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: 0a:13:25:19:a2:59:2c:b1:49:e6:62:90:57:07:e5:f7 root@hosta