1)配置ssh
(1)基本語法
ssh 另一臺電腦的ip地址
(2)ssh連線時出現Host key verification failed的解決方法
[root@hadoop61 opt]# ssh 192.168.110.62
The authenticity of host `192.168.110.62 (192.168.110.62)` can`t be established.
RSA key fingerprint is cf:1e:de:d7:d0:4c:2d:98:60:b4:fd:ae:b1:2d:ad:06.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
(3)解決方案如下:直接輸入yes
2)無金鑰配置
(1)進入到我的home目錄
cd ~/.ssh
(2)生成公鑰和私鑰:
ssh-keygen -t rsa
然後敲(三個回車),就會生成兩個檔案id_rsa(私鑰)、id_rsa.pub(公鑰)
(3)將公鑰拷貝到要免密登入的目標機器上
ssh-copy-id hadoop62
3).ssh資料夾下的檔案功能解釋
(1)~/.ssh/known_hosts :記錄ssh訪問過計算機的公鑰(public key)
(2)id_rsa :生成的私鑰
(3)id_rsa.pub :生成的公鑰
(4)authorized_keys :存放授權過得無祕登入伺服器公鑰