Telnet`ing from a shell script to Cisco MDS / Nexus

while read IP
do
(
sleep 2
echo “admin”;\
echo “password”;\
echo “show switchname”;\
sleep 2
echo “exit”;\
sleep 5

) | telnet $IP | tee -a
done < mdsswitches.ips

This entry was posted in MDS, Nexus, Shell Script. Bookmark the permalink.