歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 讓使用scp時不必輸入密碼

讓使用scp時不必輸入密碼

日期:2017/3/1 14:47:45   编辑:關於Linux
讓使用scp時不必輸入密碼 讓使用scp時不必輸入密碼,這樣就可以在shell腳本中順利地執行了: me@local: ssh-keygen -t rsa "/home/abc/.ssh/id_rsa_me" 生成: "/home/abc/.ssh/id_rsa_me" 私鑰 和 "/home/abc/.ssh/id_rsa_me.pub" 公鑰(分發給目標服務器中所有的目標用戶) 注意:要想不輸入密碼!就不要在上面輸入密碼!直接回車即可。 分發給目標服務器中某個目標用戶: me@local: cat ~/.ssh/id_rsa.pub | ssh you@remote 'cat >> ~/.ssh/authorized_keys' you@remote's password: 然後,在本地me@local使用scp登錄you@remote時就不必再輸入密碼了。 (done)
Copyright © Linux教程網 All Rights Reserved