close
1.server 端:製作ssh 金鑰 會產生兩個檔案 id_dsa ; id_dsa.pub
[root@pc01]# ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa): /root/.ssh/id_dsa
Enter passphrase (empty for no passphrase): (按enter)
Enter same passphrase again:(按enter)
[root@pc01 pbs]# ll /root/.ssh/id_dsa*
-rw------- 1 root root 668 2015-03-31 07:26 /root/.ssh/id_dsa
-rw-r--r-- 1 root root 599 2015-03-31 07:26 /root/.ssh/id_dsa.pub
2.client 端: 把server端的 id_dsa.pub 傳到client端 並重新命名為authorized_keys
[root@pc01]# ssh-copy-id -i /root/.ssh/id_dsa.pub root@pc02
[root@pc02 ~]# ls ~/.ssh/
authorized_keys
全站熱搜
留言列表