I'm using expect to send commands to my seaside server from within the image:

        arguments := { 
                self expectFile fullName.
                'ssh'.
                ipAddress.
                username.
                password }.
        process := PipeableOSProcess command: '/usr/bin/expect' withArguments: 
arguments.

        "Must be non-blocking, or #upToEnd hangs the image"
        process setNonBlockingOutput.

Where PipeableOSProcess class>>#command: aString withArguments: aCollection 

        | env pwd desc instance |
        env := CommandShell new environment. 
        pwd := '/'. 
        desc := (Array with: nil with: nil with: nil). 
        instance := PipeableOSProcess 
                new: aString
                arguments: aCollection 
                environment: env 
                descriptors: desc 
                workingDir: pwd 
                errorPipelineStream: nil.
        ^ instance value.

The problem is that I can't easily identify errors because expect delivers 
commands' stderr onto its stdout. I was wondering if I could do an initial 
login via expect, setting up to use a security key, and then use regular 
OSProcess (without expect), but that seems less flexible (would I ALWAYS want 
to use keys when you SSH? probably not). Any ideas?

Thanks,
Sean_______________________________________________
Beginners mailing list
[email protected]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to