I would like to SSH to a list of servers, to gather data in an automated fashion.
Right now my session begins with msg "Pseudo-terminal will not be allocated because stdin is not a terminal." and continues on without ever being connected to the remote servers.
If I remove '-n' form the SSH line, it connects to the remote server and stops the script execution, until the SSH session is disconnected.
 for host in $(cat host_list);
    do
        ssh -n -o stricthostkeychecking=no $host
        var1=$(awk -F '.' '{print $1}' some_file )
        var2=$(some_command $var1)
        echo $var2
    done
Original Post (For context if desired): Data Extrapolation & Bash Logic within Expect Script
 
     
     
    