設定 ssh 使用 key 認證方式登入 linux 系統
目的為設定從 hnamenode 登入 hnamenode2 無須使用密碼登入 # ssh key 認證, 還沒產生 key 前的畫面 [hadoop@hnamenode ~]$ ls .ssh/ known_hosts # 產生一對 ssh key [hadoop@hnamenode ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/hadoop/.ssh/id_rsa): Enter passphrase (empty for no passphrase): (這是key的密碼) Enter same passphrase again: (這是key的密碼,check again) Your identification has been saved in /home/hadoop/.ssh/id_rsa. Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub. The key fingerprint is: cf:d3:df:a5:cb:ae:75:b9:09:59:51:e8:c2:ff:45:33 hadoop@hnamenode2 The key's randomart image is: +--[ RSA 2048]----+ | ..| | . .| | . . . | | o .Eo| | S o oo| | o . + o| | ...