Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksh incompatble with echo -ne during $session->getExec(); #56

Open
GillesCrebassa opened this issue Jul 8, 2016 · 0 comments
Open

ksh incompatble with echo -ne during $session->getExec(); #56

GillesCrebassa opened this issue Jul 8, 2016 · 0 comments

Comments

@GillesCrebassa
Copy link

GillesCrebassa commented Jul 8, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant