Operating System - Tru64 Unix
1828239 Members
2326 Online
109975 Solutions
New Discussion

Login through batch file

 
mksharma
Occasional Contributor

Login through batch file

I am trying to write a batch file(in Window) which supplies Telnet username and password and logins to the unix box.If i run that batch file it will automatically logins to the Unix box.This i need to put in one of scripts.

5 REPLIES 5
Steven Schweda
Honored Contributor

Re: Login through batch file

Sounds more like a Windows question, than a
Tru64 question. The right answer is probably
to use SSH instead of Telnet, but you might
look into "expect":

http://expect.nist.gov/
mksharma
Occasional Contributor

Re: Login through batch file

Thanks, for suggestion
But i need use telnet for connecting the unix box.
Steven Schweda
Honored Contributor

Re: Login through batch file

> But i need use telnet for connecting the
> unix box.

So you say.

Did you look at "expect"?

Otherwise, a Windows forum may work better
than a Tru64 forum for this question.
Rob Leadbeater
Honored Contributor

Re: Login through batch file

Hi,

You might also want to think about using Perl in conjunction with the Net::Telnet module.

Cheers,

Rob
Pieter 't Hart
Honored Contributor

Re: Login through batch file

the "built-in" windows telnet has very little scripting possibilities.
if anything goes other than expected the script cannot resolve this.

So you need een terminal-emulator which can do more (like SmarTerm from Persoft but there are lost of others).
And offcourse you need the forum for that emulator-software to ask for assistance.