Tag: cisco

用于telnet切换的Ruby脚本

我创建了以下ruby脚本telnet到Cisco设备,telnet到Cisco设备并运行命令’show int status err’。 require ‘net/telnet’ C3550_20_PterraEst = “192.168.244.20” #Enter the IP address here USER = “user” #Enter username here PASS = “password” #Enter password here ENABLE = “password” #Enter enable password here print “Selezionare il piano [0-1-2-All]: “; # get the input from the console, val1 = gets; tn = Net::Telnet::new(“Host” => C3550_20_PterraEst, “Timeout” […]