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?
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.