I'm trying to SSH few servers and trying to get sudo -l
output of each server.
Below is the script I'm executing
#!/bin/bash
serverlist="/tmp/servers"
while IFS=, read -r server netgroup username user
do
ssh -tt -q root@$server sudo -U $username -l < /dev/null
done < "$serverlist"
I have found that -tt
option in this script as the cause of this error. Any thought on this?
Also i have noted that I don't see this error when i execute below command just for 1 server.
ssh -tt -q root@myserver sudo -U cham01 -l
Below is the complete error message I'am getting:
tcgetattr: Inappropriate ioctl for device