-
Dear All,
Can anyone please suggest me how to invoke telnet using DOS batch files?
I tried giving :
for ex:
telnet 10.10.230.15 john/sam
The above is invoking telnet but it's prompting for username and password?
Please helpme out....
Thanks in advance
-
Its not clear what u really want todo?
sorry.
-
The problem is that you can not give unix password along with the username just like an oracle password. The telnet syntax is:
telnet -l user host
and then you need to give the password.
-
:) Hi,
I think I can Answer ur question...
you cant directly call the telnet command from batch file...
but you can do like this by using Windows Script...
I have done this personally and it worked out...
-------------------------------------------------------
var Shell=WScript.CreateObject("WScript.Shell");
Shell.Run("telnet 10.20.10.20");
WScript.Sleep(100);
Shell.SendKeys("username");
Shell.SendKeys("{ENTER}");
WScript.Sleep(100);
Shell.SendKeys("password");
Shell.SendKeys("{ENTER}");
WScript.Sleep(100);
---------------------------------------------------------
Save this as .js file and run it
you will definitely connect to telnet... Hope you understood...
-
This thread is almost 6 years old. I think the OP got tired of waiting.
-
Thanks!
Thanks for the javascript solution .. works like a champ!!!:):)