Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Interactive sessions on another box from Win32

Reply
Thread Tools

Interactive sessions on another box from Win32

 
 
John Call
Guest
Posts: n/a
 
      10-28-2003
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


 
Reply With Quote
 
 
 
 
Bill
Guest
Posts: n/a
 
      10-29-2003
"John Call" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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');
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Python 2.4: Unbuffered flag causes SyntaxError on interactive sessions? Lonnie Princehouse Python 11 09-15-2005 09:14 AM
Interactive/Non-interactive ASPX ? WJ ASP .Net 2 02-26-2005 02:54 AM
non Interactive and Interactive AAH Computer Support 0 01-09-2005 04:09 PM
Interactive and non interactive AAH Computer Support 1 01-09-2005 04:01 PM
Re: Relationship between IIS Sessions and ASP.NET Sessions? Ken Cox [Microsoft MVP] ASP .Net 1 08-08-2003 03:22 PM



Advertisments