Interactive sessions on another box from Win32

Discussion in 'Perl Misc' started by John Call, Oct 28, 2003.

  1. John Call

    John Call Guest

    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
     
    John Call, Oct 28, 2003
    #1
    1. Advertising

  2. John Call

    Bill Guest

    "John Call" <> wrote in message news:<>...
    > 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');
     
    Bill, Oct 29, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,373
    Luther Miller
    Aug 8, 2003
  2. WJ
    Replies:
    2
    Views:
    493
  3. Lonnie Princehouse
    Replies:
    11
    Views:
    670
    Steve Holden
    Sep 15, 2005
  4. scottymo
    Replies:
    3
    Views:
    707
    Dominick Baier
    Sep 30, 2006
  5. Bookham Measures

    Moving from ASP Sessions to Database Sessions

    Bookham Measures, Jul 23, 2007, in forum: ASP General
    Replies:
    19
    Views:
    569
    Bookham Measures
    Aug 23, 2007
Loading...

Share This Page