天天看點

linux ssh無密碼登入

1、架構

   192.168.0.5    登入機。

   192.168.0.10   被登入機。

2、執行步驟

   (1)在192.168.0.5上執行

      #ssh-keygen -t rsa     一路回車

           在~/.ssh/目錄下生一對公鑰和私鑰id_rsa   id_rsa.pub

       (2)把公鑰id_rsa.pub拷貝到遠端登入機上

           #ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

           輸入密碼

           10

           Now try logging into the machine, with "ssh '[email protected]", and check in:

            .ssh/authorized_keys

            to make sure we haven't added extra keys that you weren't expecting.

           成功!

<a href="http://www.055680.com/" target="_blank">城市物語</a>

    本文轉自yuangang_love 51CTO部落格,原文連結:http://blog.51cto.com/linux008/588080,如需轉載請自行聯系原作者

繼續閱讀