Forum Discussion
How do you get this to work? I've been trying for along time to get windows' built-in telnet to do this. Telnet takes all input from interactive input (except for user/pwd for telnet links). Trying to run batch files like this halt once the telnet program runs. Trying to redirect input via "<" doesn't go either, nor does using "|".
i.e.
echo telnetdata | telnet ip port
I've heard people point to expect (http://expect.nist.gov) as the solution to doing batc mode telnet control. Typically in my experience you could reduce your batch file to just the telnet line to determine if the port is open or not. Although this
would not account for a filtering proxy or some such other stand in device. All you'll know is if the port is open or not, and not wether you can actually pass email traffic through it.
- CEsoft16 years agoNew ContributorI've made some progress.I can remotely execute simple commands such ascd ~/Downloadsls -albut when I need the users password, egsudo rm 1.5.0I get the not entirely unexpected errorsudo: no tty present and no askpass program specifiedAny tips on how to prompt the user for a password while running sudo?