0
rated 0 times
[
0]
[
0]
/ answers: 1 / hits: 1044
/ 1 Year ago, sun, december 11, 2022, 7:52:07
I have one master and four slave computers. I generated rsa public/private key on master PC. Then I copied publickey (id_rsa.pub
) to slave machines as authorized_keys
.
It doesn't ask password when I invoke SSH like this on master PC's terminal:
ssh –o UserKnownHostsFile=/dev/null –o StrictHostKeyChecking=no hduser@slave1
I wrote this script to automatically login slave machines without asking password.
SERVER_LIST=`cat /home/hduser/slaves` # slave1, slave2 ...
USERNAME=hduser
for host in $SERVER_LIST; do
ssh –t –o UserKnownHostsFile=/dev/null –o StrictHostKeyChecking=no -l ${USERNAME} ${host};
done
SSH is asking slaves passwords when I use this script. I'm getting this message when use SSH with -vv
option:
I changed permissions on master PC and slave PC.
sudo chmod 700 -R ~/.ssh
sudo chown hduser ~/.ssh
It still asking password. What am I missing? How can I fix it?
More From » server