Not able to ssh from one base server to another server:
It prompts for username and password, the password is asked thrice.
After that, it prompts for the password of the submachine that I want to connect. Once that is entered, it says
Code part:
read -p "Enter username: " usr
read -s -p "Enter Password: " pswd \n
echo
$ExportFileLocation "/tmp/Outputfile.txt"
IFS=","
while read f1 f2
do
echo "PrivateIP is : $f1"
echo "Hostname is : $f2"
done < Inputfile.txt
for HOST in $(cat Inputfile.txt ) ; do ssh $HOST "yum install httpd -y"; done
OUTPUT :
[root@asdfggg tmp]# ./test.sh
Enter username: abcd
Enter Password:
PrivateIP is : xx.xx.xx.xx
Hostname is : asdfggg
Password:
Password:
Password:
root@xx.xx.xx.xx's password:
Permission denied, please try again.
root@xx.xx.xx.xx's password: