1. 程式人生 > >ssh基於密鑰免密碼登錄

ssh基於密鑰免密碼登錄

oot -i etc 登錄 conf config strong 日誌文件 var

1.客戶端生成密鑰對
                **ssh-keygen -t rsa **

        選項: 
                    -t:加密類型
                    -b:加密長度

2.將公鑰傳到遠程主機

    **ssh-copy-id -i id-rsa.pub [email protected]**
        選項:
                        -i:公鑰

3.測試

ssh [email protected]

配置文件:/etc/ssh/sshd.config
日誌文件:/var/log/secure

ssh基於密鑰免密碼登錄