DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Calling unix telnet from Dos Batch File

  1. #1
    Join Date
    Mar 2002
    Posts
    9
    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


  2. #2
    Join Date
    Nov 2000
    Posts
    34
    Its not clear what u really want todo?

    sorry.

  3. #3
    Join Date
    May 2001
    Location
    San Francisco, California
    Posts
    511
    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.
    Remember the Golden Rule - He who has the gold makes the rules!
    ===================
    Kris109
    Ph.D., OCP 8i, 9i, 10g, 11g DBA

  4. #4
    Join Date
    Feb 2008
    Posts
    1

    Thumbs up

    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...

  5. #5
    Join Date
    Apr 2006
    Posts
    377
    This thread is almost 6 years old. I think the OP got tired of waiting.

  6. #6
    Join Date
    May 2010
    Posts
    3

    Thumbs up Thanks!

    Thanks for the javascript solution .. works like a champ!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width