Hi, i run a lot telnet scripts using /dev/tcp for cisco routers, lately we have newer models of cisco routers which have ios-xr which is based on linux and also some mikrotik routers which are again based on linux, on these devices when i run my script all i get is ÿý^Xÿý ÿý#ÿý'ÿý$ÿý! in my output, no username prompt, on the same device if if use a netcat -T option which is for telnet negotiation, it works, Could anyone guide me in the right direction where i can achieve the same using /dev/tcp below example script
#!/bin/bash exec 3<>/dev/tcp/$1/23 sleep 1 echo -e "username">&3 echo -e "password">&3 echo -e "sh ver">&3 #sleep 2 echo -e "logout">&3 cat<&3 > $1.txt -- Thanx and regd's. Allan. http://www.in2dwok.com