This is my script that I have
ssh server1 << EOF
ssh server2 << EOB
EOB
EOF
I am able to enter the password for server1 successfully, but then it just freezes for a couple seconds and outputs an error saying "Too many authentication failures". Can anyone help? I want to have nested SSH'es to automate some stuff I'm doing.