Linux SSH sends a remote command java but prompts that there is no command?

< H1 > sends a command to the server through SSH , but the response is that there is no java command. In fact, the server is < / H1 > with Java installed.

in the server java execution:

clipboard.png

SSH

 

so, is there a problem with the Java installation on the server?

Apr.23,2021

the server-side environment variable configuration execution path for ssh remote execution commands is different from the environment variable configuration execution path for direct login. The details are very interesting. It is recommended that you take a look at ssh remote execution script environment variables


is caused by different environment variables. SSH uses the absolute path of java to try when sending remote commands.

Menu