Quantcast
Channel: Active questions tagged expect - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 157

Use a script for a telnet session

$
0
0

I have a problem with my script. It seems my password is wrong.

#!/usr/bin/expectset ip [lindex $argv 0]spawn telnet $ipset timeout 10expect "Login:"send "administrator\r"expect "Password:"send "123456"send "\r"

It says, login incorrect. But it works, when i use cmd on Windows to telnet to my phone, it works with "administrator" and 123456 as password.I don't know why in my script, I could not log on successfully.

I have to use this script to downgrade/upgrade my phones.


Viewing all articles
Browse latest Browse all 157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>