in reply to Re: ssh trouble
in thread ssh trouble

okay,thanks. I tried that and got an output of "2". any idea what that means?

Replies are listed 'Best First'.
Re^3: ssh trouble
by Bloodnok (Vicar) on Mar 10, 2009 at 19:22 UTC
    2 is the code for POSIX error ENOENT - file not found - see Error.

    A user level that continues to overstate my experience :-))
      I see that, but the file is there... I am confused.
Re^3: ssh trouble
by toolic (Bishop) on Mar 10, 2009 at 19:08 UTC
    No idea. I updated my node. You should print out all 3 pieces of information (out, err, exit). What do you expect them to be? When you run your getEnvs.pl script, what do you expect its output to be? You probably expect its exit status to be 0, right? Also, does your "cd AATv2" command succeed?

      It seems that the cd is working, and I noticed $err is printing out "Can't open perl script "getEnvs.pl": No such file or directory." which is weird, because I know for a fact that it is there. I can manually create an ssh session, and copy and paste those same commands from my script to my ssh, and they work fine. I tried being more specific with the cd path, but that didn't seem to make a difference either.

        just grasping at straws... does SSH think the file is there? Are permissions OK?
        ($out, $err, $exit) = $ssh->cmd("ls -la");