This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: Problem with a Script
Tughan Hafizoglu wrote:
$ ( echo "root" ;
sleep 1;
echo "password";
sleep 1;
echo "df";
sleep 1 ) | telnet 192.168.0.X
Why not use ssh instead? Use keys instead of passwords and you get
automatic logins easily. You can even pass the command to execute on
the remote server after login if you want.
When I try running this on Cygwin shell which runs on the windows 2003
box, it opens the Microsoft Telnet Client
Maybe if you install the inetutils package this will be fixed, because
then you'll be using Cygwin's telnet. But again, I think it's better to
avoid this automatic login hack to begin with.