SSH Command not found

Hi there,

I am trying to connect to a remote Synology Docker Container via ssh. Login works well, but the docker command is not found, although if i run this command via Terminal it works.

Are there any limitations in running SSH commands? Wiki does not say much. Thanks

Hi @simistef
Have you tried to enable the Capture output mode and disable the Halt if the exit code is not 0?
In this mode, the ssh command should return a column with a text response.
It may help you to fix the issue.

Here is a short article on how to fix the error 127

Thanks for your reply. I did as asked and managed to get further but got another error:

image

i managed by providing the full path to docker command /usr/local/bin/docker ps. I guess PATH variables are not taken in consideration ?

Docker normally requires sudo, so the command would need to be something like this:

echo mypassword | sudo -S docker ps

It doesn’t seem to work in EasyMorph.

I guess PATH variables are not taken in consideration ?

You could check the PATH variables with this command
echo $PATH

Hi @nicktagz
Prompting a password by sudo depends on the server configuration.

Prompting sudo passwords could be turned off for a whole system.
Also, it is possible to configure an allowlist of applications that permit sudo without a password.

If you want to pass a sudo password, the command line should be something like this.

echo 'password' | sudo -kS /usr/local/bin/docker ps

Where /usr/local/bin/docker ps is a desired command.

See this link for more info.

1 Like

This worked for me. Thanks @ckononenko

1 Like

Thanks @ckononenko it worked indeed !

1 Like