Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

telnet connection is good on suse but bad on cygwin - need help

Status
Not open for further replies.

Yarka

Technical User
Jan 14, 2007
192
ES
hi,
i do a script to router' configuration. It is running on distribution suse and its output is correct. But now, I must run same script on Windows. For this reason I've installed cygwin, but when I run this, the router' configuration doesn't change.
The script is similar to:

#/bin/bash
(echo "routerpass";
echo "routerpass";
echo "enable";
echo "routerpass";
echo "configuration terminal";
...
) | telnet 10.0.9.1

If I do
telnet 10.0.9.1
routerpass
routerpass
enable
routerpass
configuration terminal
...

all it online, it works good but I need a sript. How can I resolve this?

Txs.
 
Are you saying that you can manually run the commands from a Cygwin terminal session?

Does the script actually run?

You may have a conflict in version/capabilities in the telnet client you are using from Cygwin vs. what Suse offers you.

D.E.R. Management - IT Project Management Consulting
 
hi,
yes, i can manually run the commands from a Cygwin terminal session.
The script run because it opens a new session (telnet session), but i believe that it doesn't pass or doesn't pass correct user , password, ..., but it doesn't show any message, log.
I've tried to redirect the script, doing:
./my_script.sh > /home/Administrator/log
but the file ever is empty, :-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top