I have a list of servers in a .txt file. Assume that the authorized keys are all in place in the servers.
#!/bin/bash while read server <&3; do #read server names into loop [[ $server =~ ^[[:space:]]*$ ]] && continue #prevents a empty line in file echo "Name read from file - $server" #SSH login ssh "$server" done 3</home/u0146121/Matt/servers.txt
My questions are...
Do I ssh correctly? Will this all be non-interactive?
Note - I would try this out on the servers but I don't have access to them yet and I want to get my syntax right before hand. I am a beginner in bash and ssh.