Hi Jos,

    I started working on a perl wrapper class for SSH/Expect to
    allow me to create an API similar in nature to what you 
    want .. the perl class wrapper allows you to log in to a remote
    machine over SSH (with password or PKI) and then do whatever
    you need to do .. I created this so I could create a management API 
    that would allow for remote management of many machines from a central 
    point .. over ssh, so that standard tools could be used and no special 
    configuration would be necessary on the client machines :).

    I did this both in perl and then in python .. and found the
    python version to be much easier to do, much shorter, and
    more stable and functional.

    I have programmed perl for 8 years and I love it but for this
    one I couldn't get the perl version to handle pseudo-ttys on
    the remote machine properly :(.

    Thus far I just have enough code in place to:
    1)  Login to the remote machine as a normal user
    2)  su - root (python version only)
    3)  Run commands on the remote server
    4)  Have scripts created locally:
        a)  Transferred to the remote machine
        b)  run
        c)  STDOUT/STDERR returned to the local caller
        d)  The remote script is deleted.

The code is definitely alpha quality but I would be happy to share with
you the perl and python stuff I have.  

I couldn't get SSH/Perl/Expect to handle pseudo-ttys on the remote machine
properly :( so su'ing to root with perl doesn't work over SSH in my
code .. but the python version DOES work :) very nicely.

Just email me privately if you'd like the code and I will make it available
to you .. same for anyone else who might be interested in it.

Regards,
Max

On Mon, 03 Feb 2003 17:29:32 +0100, Jos Kirps|EducDesign wrote:
> I would like to set up a Linux based file server accessible for Linux,
> Windows and Mac clients. The administration shall be done remotely
> (web based GUI on a client machine) using Perl scripts. The Perl
> scripts must be able to:
> 
> - add and remove directories on the server (that's not the problem)
> - add and remove users (username & password -> problem)
> - set access rights for the created directories (-> also a problem)

Reply via email to