Centos集群进行SSH免密

生成密钥

ssh-keygen -t rsa -P ''

把id_rsa.pub追加到授权的key里面去。
默认存储在/home/hadoop/.ssh

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

丢到子节点组成免密登陆

scp ~/.ssh/authorized_keys  [email protected]:~/.ssh

从机操作(如果是root用户传输的话,下面的设置权限步骤可以省略)

chmod 600 ~/.ssh/authorized_keys

你可能感兴趣的:(Centos集群进行SSH免密)