Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB Script for auto login for telnet

267 views
Skip to first unread message

neilos

unread,
Jul 8, 2009, 1:11:20 PM7/8/09
to
Hi

I am looking for a vbs to (auto login) to a telnet session so this
will need to login with both a user-name and password.

Pegasus [MVP]

unread,
Jul 8, 2009, 2:18:48 PM7/8/09
to

"neilos" <neilwill...@googlemail.com> wrote in message
news:f93bc4eb-b3a4-4354...@d32g2000yqh.googlegroups.com...

> Hi
>
> I am looking for a vbs to (auto login) to a telnet session so this
> will need to login with both a user-name and password.

I don't have a VB Script solution but here is a batch file solution: It uses
nc.exe which you can download from here:
http://www.securityfocus.com/data/tools/nc11nt.zip. Type nc.exe -h to get
help.

Step 1
Create a batch file c:\Windows\MyTelnet.bat with the following lines inside:
@echo off
nc 192.168.1.99 23 < c:\Windows\MyTelnet.scr
{Adjust the IP address and the port number to suit your environment}

Step 2
Create a script file c:\Windows\MyTelnet.scr with the following lines
inside:
neilos
SomePassword
{put your telnet commands here}
exit
{Put a blank line here}

Step 3
Create a desktop shortcut that points to c:\Windows\MyTelnet.bat

Step 4
Test the shortcut you created.


0 new messages