1752590 Members
2879 Online
108788 Solutions
New Discussion юеВ

Re: Telnet from WinXP

 
Brian_213
Occasional Contributor

Telnet from WinXP

I have been trying to Telnet from a Windows XP machine using a .bat file and a .txt file, example of the command in the .bat file I have been using is below.

telnet 192.168.0.58 < toDo.txt

However when I go to execute this command all that is returned is the following while none of the command that are in the .txt file are done:

Welcome to Mircrosoft Telnet Client
Escape Character is 'CTRL+]'

then gives me the C: prompt again, however when I go 'telnet 192.168.0.58' I get prompted for the username and then password and not that Welcome to MS Telnet stuff.

Any suggestions are greatly appreciated

Thanks
5 REPLIES 5
Zafar A. Mohammed_1
Trusted Contributor

Re: Telnet from WinXP

Is that you want to run some scripts/jobs on telnet host? If you want to run in batch mode telnet i.e. without issuing Username and Password, then use Perl module Net::Telnet.

Thanks
Zafar
Brian_213
Occasional Contributor

Re: Telnet from WinXP

Perl is not an option, I need to telnet to the linux machine from a winXP machine using .bat files and .txt files that would be on the winXP machine in order to access the linux machine, which has username and password

Thanks
Jon Finley
Honored Contributor

Re: Telnet from WinXP

XP's telnet client is NOT really intellegent.

You would need to use something like TeraTerm or TTwin.

But... you could try the following:

create a user on the linux system whose shell is the script you want to run.

You successfully login, your script runs, the ls=ast command is an exit which forces a logoff/disconnect of the client.

Jon
"Do or do not. There is no try!" - Yoda
Massimo Bianchi
Honored Contributor

Re: Telnet from WinXP

To do that you must install expect for windows, or perl for windows.

telnet in windows has not the same flexibility as on unix world..

Massimo
Antoniov.
Honored Contributor

Re: Telnet from WinXP

Hi Brian,

I'm using Pathwork32 of HP OpenVMS suite that's containts PowerTerm emulator. This software that you can found in Ericom Ltd (http://ericom.com) is the best VT emulator running over any Windows OS, MAC, WBT (Windows Based Terminal) and Handled Device.
PowerTerm runs a simple scripting language; I used this to connect to a server and transfer information from/to it.

Remember when you execute telenet ... < ToDo.txt when input file ToDo.txt ended, telnet session has not more a input device so working very bad and can crash.
PowerTerm permit you open a session and continue using keyboard either complete session work.

HTH
Antoniov
Antonio Maria Vigliotti