天天看點

Ubuntu16.04 SSH 免密登入

1. 生成公鑰,輸入指令後按四個回車。

    ssh-keygen -t rsa

Ubuntu16.04 SSH 免密登入

2. 進入到.ssh檔案夾下,然後追加公鑰到公共檔案

    cd .ssh

    cat id_rsa.pub >> authorized_keys

Ubuntu16.04 SSH 免密登入

3. 測試免密登入

    ssh localhost

Ubuntu16.04 SSH 免密登入

繼續閱讀