解決linux中ssh登入Warning:Permanently added (RSA) to the list of known hosts

來源:互聯網
上載者:User

標籤:style   ar   color   os   sp   strong   檔案   on   2014   

從 遠程 複製檔案到 到本地

# scp scp [email protected]:/root/zbdata/api-148.log-2014090412.bz2 /root/zbdata

報Warning:Permanently added (RSA) to the list of known hosts錯誤

 

原因:在執行scp 時,沒在原生/root/.ssh下產生known_hosts檔案。

解決方案:
# vi/etc/ssh/ssh_config
最後有兩行是
        StrictHostKeyChecking no 
        UserKnownHostsFile /dev/null
把這兩行注釋掉並儲存檔案
再次執行scp scp [email protected]:/root/zbdata/api-148.log-2014090412.bz2 /root/zbdata
出現提示

Theauthenticity of host ‘10.1.11.210 (10.1.11.210)‘ can‘t be established.
RSAkey fingerprint is a0:09:89:d2:3b:aa:91:60:59:7f:7f:bc:03:31:b0:09.
Areyou sure you want to continue connecting (yes/no)? 

輸入yes後,則可看到在/root/.ssh目錄下產生了known_hosts檔案:


[[email protected].ssh]# ls
id_rsa  id_rsa.pub  known_hosts

解決linux中ssh登入Warning:Permanently added (RSA) to the list of known hosts

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.