php-ssh
php-ssh copied to clipboard
ksh incompatble with echo -ne during $session->getExec();
Hi,
I'm connecting to a server AIX using ksh on ssh.
$ssh_remote_script_path= '/home/user_ksh/em/em_os.sh'; $configuration = new Ssh\Configuration('IPAddress'); $authentication = new Ssh\Authentication\Password('user_ksh', 'password'); $session = new Session($configuration, $authentication); $exec = $session->getExec(); $result = $exec->run($ssh_remote_script_path);
The sript on remote server is /home/<user_ksh>/em/em_os.sh which just identify the server (Linux, AIX, solaris...)
The $result is 'AIX -ne' due to function run(...) in Exec.php which use the command:$cmd .= ';echo -ne "[return_code:$?]"';
Do you think it's possible to change or force the bash or removing the '-ne' when it's ksh ?
Thanks Gilles