Interactive sessions on another box from Win32

J

John Call

I need to write some code on a Win32 box that will connect securely to a
linux box, su (which is interactive), and then run a command line program
which will prompt me for some input (interactive). I planned to ssh to the
box and use Expect to handle the interactive issues. I have found that
Expect is not an option on Win32.

I am only vaguely familiar with Win32 and am not sure what my options are
for connecting securely to linux box and running interactive programs on the
linux box. My own research has turned up very little. If anyone has any
ideas on this I would appreciate it.

thanks,

John
 
B

Bill

John Call said:
I need to write some code on a Win32 box that will connect securely to a
linux box, su (which is interactive), and then run a command line program
which will prompt me for some input (interactive). I planned to ssh to the
box and use Expect to handle the interactive issues. I have found that
Expect is not an option on Win32.

I am only vaguely familiar with Win32 and am not sure what my options are
for connecting securely to linux box and running interactive programs on the
linux box. My own research has turned up very little. If anyone has any
ideas on this I would appreciate it.

This is a command line login, or a GUI login?

Look at Net::Telnet and the waitfor function. If it needs to be ssh,
there may be a way to run a similar script through that (anybody
know?). Regular telnet will pass passwords in plaintext by default.

In general, it would be something like:

$t = new Net::Telnet (Port => $portnum, Timeout => 20);
$t->open('myserver');
$t->waitfor('/login: $/');
$t->print('administrator');
$t->waitfor('/password: $/');
$t->print('my-passwd');
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top