Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Telnet in UNIX

Status
Not open for further replies.

vanna

Technical User
May 30, 2002
3
MT
I am doing a script which has to telnet another machine and run a program on this machine. How do you set the telnet command so that it automatically inputs the username, password and type of emulation setup?

Thanks
 
Does this have to an interactive session? If not, I would look at rexec or even better, SSH.
 
First of all thanks for your help - but I still have not managed to telnet the remote host bypassing the password input stage.

Any ideas?
 
SSH ( can be configured to remotely connect from one system to another without the use of a "password". It uses "Trusted Hosts" for authentications if you configure it correctly.

You can also setup remote commands by modifying the .rhosts and possibly /etc/hosts.equiv on both machines to allow specific connections from one system to the other with prompting for passwords.

Expect is definately the best option, since it's highly customizable...
 
i believed you are looking into putting a .netrc script in the user you are about to use for telnet, or try to put it inside the /etc directory instead. Try to search for .netrc configurations... by default it doesnt come with this, so you need create this file... then inside you need to place the ftp user and machine name and password as well..
hope this answers your question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top