Skip to content
Advertisement

Can`t call command with variable on sh file using ssh

I have the script on centos 7 server for kill process by used id:

JavaScript

Above script works fine when it is called from the server.

But my goal calls this file using ssh from my local machine like:

JavaScript

But I git this error:

JavaScript

Advertisement

Answer

you need to install lsof on the remote server.

or try to add the full path like /usr/sbin/lsof to your script or configure your PATH in the remote server if the binary is already installed

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement