Lo primero es generar un par de claves pública-privada para el acceso SSH en el nodo administrador:
1 2 3 4 |
# ssh-keygen -t rsa -N '' -f .ssh/id_rsa Generating public/private rsa key pair. Your identification has been saved in .ssh/id_rsa Your public key has been saved in .ssh/id_rsa.pub |
1 2 3 4 5 6 7 8 |
# ssh-copy-id -f -i .ssh/id_rsa.pub root@hadoop-master1 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub" root@hadoop-master1's password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh 'root@hadoop-master1'" and check to make sure that only the key(s) you wanted were added. |
1 |
# ssh root@hadoop-master1 |