Re: Interactive sessions on another box from Win32

From: Bill (wherrera_at_lynxview.com)
Date: 10/29/03


Date: 28 Oct 2003 22:18:52 -0800


"John Call" <jcall@ellijay.com> wrote in message news:<bnmtmb01fb1@enews1.newsguy.com>...
> 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');



Relevant Pages

  • Re: Linux / Windows GUI application with assembly
    ... before Applications could have been written in Asm, ... under Win32, and the Linux Asm Stuff is still in the ... There is still some assemblers which compile successfully binaries ... under Linux, and I thought someone had already investigated the GUI ...
    (alt.lang.asm)
  • Re: The Delphi Survey
    ... and Linux, but not for win32 and .NET. ... capacity and bigger gain for code compatibility with Linux than there is ... It's also different because .NET, without Mono support, is a Windows ...
    (borland.public.delphi.non-technical)
  • Re: Will there ever be a new Delphi for Win32?
    ... some .NET projects run on Mono directly. ... Calvert's article on running .NET WinForms code on Mono and Linux. ... No. CLX is only supported on Win32 and Linux. ... Yorai Aminov (TeamB) ...
    (borland.public.delphi.non-technical)
  • Free SFTP C++ library?
    ... with C/C++ library for using SFTP and SSH (as client) You can suggest? ... It must be free for commercial use, and work both for win32 and linux ...
    (alt.os.linux)
  • Re: findfirst, findnext and finddata_t
    ... |> I'm porting a Win32 application to linux. ... The Win32 API appears, based on the little bit posted in this thread, to ... tree walk) and each subsequent item. ... The ftw "package" does not appear ...
    (comp.os.linux.development.system)