建立SSH連線時使用RSA與DSA金鑰驗證就能免帳號密碼建立連線~ client端(假設連線帳號為user): User$ ssh-keygen -t rsa User$ scp ~/.ssh/id_rsa.pub user1@serverip:id_rsa.pub User$ ssh-keygen –t dsa User$ scp ~/.ssh/id_dsa.pub user1@severip:id_dsa.pub Server端: User1$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys User1$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys User1$ chmod 644 ~/.ssh/authorized_keys 完成以上操作,即可在user上透過ssh user1@server 直接連線server. |
沒有留言:
張貼留言