Discussion Locked

Entering a password through a script

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
When telneting into a server is there some way that the password can be entered within a script.

5 replies

by joematus

The only ways I know to do this is to use the "expect" scripting language which allows you to do telnet scripting. If you know perl, then you can also do this by using the perl module Expect.pm. You can also accomplish scripting with the perl net::telnet module. Netcat 1.10 will also accomplish this because it is a simple Unix utility which reads and writes data across network connections using TCP or UDP protocol.

But if what you're trying to accomplish is to execute commands automatically on another system, perhaps rexec (included with Solaris) will suit your needs. This is not considered secure and if you're worried about security, the look at rsh, which is part of the SSH package. These all should suit your needs.

Hope this helps....

-- Joe

by donaldsimpson.co.uk

Hi,
That really depends on you OS... I have a requirement to script a logon (and more) from NT using only readily available utils, and can't see any way to do so.
On *nix, or a system with PERL or somesuch on it, it should be possible - would you be interested in that?
I recall seeing some decent Telnet clients that could record Macro's etc too, and a search on downloads.com or google would probably find them again...
Good luck,
Don

This discussion is closed to new replies.