Hello,
I am trying to excecute script on remote Debian machine from Jenkins. I have working SSH Connection from Jenkins to Linux machine but cannot excecute script. I am using Publish over SSH plugin in Jenkins and that script command is placed in "Exec command". I have tried various paths without success. I get following error lines in Jenkins log: "SSH: EXEC: STDOUT/STDERR from command [./test] ..." and "fatal: unrecognized command". That [./test] is the script on remote machine that just prints out test message at this point. I am still wondering about that unrecognized command part. Is that referring to SSH command? Script is executable.
I can even excecute that script from my windows machine with ssh <user@remote_machine> <script>. I am using another user for this test but ssh connection is working from Jenkins to Linux machine when i run test from Jenkins configuration page.
I have a another remote SSH server setup in that same Jenkins configuration that is working just fine and excecutes its script on another remote Linux machine. The configurations between two SSH servers are same in Jenkins end. Different ssh keys of course and so on.
Could there be some Linux configuration detail on my another Linux machine that prevents ssh script excecution from Jenkins machine? Something to do with SSH configuration or permissions? Maybe something wrong with environment variables?
I am bit of a beginner with Linux systems and could not find the answer to this problem.
Appreciate any help.
Thanks!
I am trying to excecute script on remote Debian machine from Jenkins. I have working SSH Connection from Jenkins to Linux machine but cannot excecute script. I am using Publish over SSH plugin in Jenkins and that script command is placed in "Exec command". I have tried various paths without success. I get following error lines in Jenkins log: "SSH: EXEC: STDOUT/STDERR from command [./test] ..." and "fatal: unrecognized command". That [./test] is the script on remote machine that just prints out test message at this point. I am still wondering about that unrecognized command part. Is that referring to SSH command? Script is executable.
I can even excecute that script from my windows machine with ssh <user@remote_machine> <script>. I am using another user for this test but ssh connection is working from Jenkins to Linux machine when i run test from Jenkins configuration page.
I have a another remote SSH server setup in that same Jenkins configuration that is working just fine and excecutes its script on another remote Linux machine. The configurations between two SSH servers are same in Jenkins end. Different ssh keys of course and so on.
Could there be some Linux configuration detail on my another Linux machine that prevents ssh script excecution from Jenkins machine? Something to do with SSH configuration or permissions? Maybe something wrong with environment variables?
I am bit of a beginner with Linux systems and could not find the answer to this problem.
Appreciate any help.
Thanks!
Last edited: