#使用ssh-keygen命令生成金鑰對
ssh-keygen -t rsa #-t表示型別選項,這裡採用rsa加密演算法
# 使用ssh-copy-id命令將公鑰複製到遠端主機。ssh-copy-id會將公鑰寫到遠端主機的 ~/ .ssh/authorized_key 檔案中
ssh-copy-id [email protected]
3、出現問題
/usr/bin/ssh-copy-id: info: source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
the authenticity of host
'172.18.39.165 (172.18.39.165)' can't be established.
ecdsa key fingerprint is sha256:3ru1d7vogypsktcomqtelagz4vpxmjwqbn4thy7ikrm.
ecdsa key fingerprint is md5:c0:44:2a:59:4d:7e:09:1c:06:a1:cb:3b:67:8a:9a:44.
are you sure you want to continue connecting (yes/no)?
/usr/bin/ssh-copy-id: info: attempting to log in with the new key(s), to filter out any that are already installed
the authenticity of host '
172.18.39.165 (
172.18.39.165)
' can't be established.
ecdsa key fingerprint is sha256:3ru1d7vogypsktcomqtelagz4vpxmjwqbn4thy7ikrm.
ecdsa key fingerprint is md5:c0:44:2a:59:4d:7e:09:1c:06:a1:cb:3b:67:8a:9a:44.
are you sure you want to continue connecting (yes/no)?
/usr/bin/ssh-copy-id: error: host key verification failed.
執行如下命令
ssh -o stricthostkeychecking
=no ip
ssh 配置遠端免密登入 linux
1.本地客戶端生成金鑰対 名字預設即可,密碼輸入ssh登入時的密碼 ssh keygen t rsa命令執行完後 本地會在.ssh 資料夾中生成相應檔案 2.將生成的公鑰 id rsa.pub 傳至遠端,並放在.ssh 目錄下 命名為authorized keys並加上相關許可權 如服務端已有此檔案...
linux使用者配置ssh免密遠端登入
環境 centos 7.3 1.修改hosts檔案 etc hosts vi etc hosts web3 192.168.1.33 前者為主機名 後者為ip位址2.生成金鑰 ssh keygen t rsa 一路回車注 id rsa為私鑰檔案,id rsa.pub為公鑰檔案 3.遠端傳輸公鑰 本地...
linux 遠端ssh免密登入
先說說需求 我們平時開發 運維操作linux過程中經常需要實現將遠端檔案拷貝到本地或者本地檔案拷貝到遠端 執行遠端命令等操作 這個時候建立ssh免密登入應該是乙個比較好的選擇 原理 在linux系統中,ssh是遠端登入的預設工具,因為該工具的協議使用了rsa dsa的非對稱加密演算法 非對稱加密演算...