天天看点

day02 秘钥生成,免密访问命令

hadoop免密登陆:

生成秘钥:

ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa

cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys 

cat ~/id_dsa.pub >> ~/.ssh/authorized_keys 

scp id_dsa.pub [email protected]:~

/etc/hosts,主机名和IP配置文件:  vi /etc/hosts回车,切换到编辑模式'i',手动添加

127.0.0.1         node1  localhost

192.168.80.102    node2

192.168.80.103    node3

192.168.80.104    node4

::1             localhost6.localdomain6 localhost6

~

来自为知笔记(Wiz)