in reply to Net::OpenSSH can't change working directory

I don't think it's about setting options... show us your code so we could know what's you are talking about.

Normally your command should be something like $session_obj->system('cd /home/...') or die $session_obj->error;

If it says directory doesn't exists then you might have some spelling error.

Replies are listed 'Best First'.
Re^2: Net::OpenSSH can't change working directory
by josh803316 (Beadle) on Jul 16, 2010 at 20:00 UTC
    Here is the code I'm using for capturing the command:
    my ($out,$err) = $self->{connected}->capture2($params->{cmd});
    I double checked the spelling to make sure it wasn't that, copy/paste style. Same command works by hand. Could it be because I need to quote the command? I have a command list that I loop through gathering the result output
    cd /home/sitest/Scripts..... tclsh test_script.tcl ./check_network.pl