-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
Jenkins is on CentOS on Tomcat,
SSH server is on Windows 7 x32 (FreeSSHd as a service).
When trying to execute a command over SSH I get:
SSH: EXEC: STDOUT/STDERR from command [.../some.exe
] ...
AllowDesktopAccess failed.
Unable to execute command or shell on remote system: Failed to Execute process.
This seems like a bug because SSH seem to work otherwise:
1. Transferring files with Jenkins over SSH works fine.
2. Executing commands from PuTTy, from my other Windows machine works (it is a bit slow, but works).
3. Executing commands from the computer Jenkins is on (over command line ssh client) also works.
Currently FreeSSHd is running as a service and I've set up logging in with Windows auth, but auth itself seem to be working fine even with Jenkins (test of setup passed, transferring files works fine).
[JENKINS-17809] Problem executing commands on Windows over SSH
Workflow | Original: JNJira [ 148989 ] | New: JNJira + In-Review [ 177252 ] |
Assignee | Original: bap [ bap ] | New: Alex Earl [ slide_o_mix ] |
Resolution | New: Cannot Reproduce [ 5 ] | |
Status | Original: Open [ 1 ] | New: Closed [ 6 ] |
Hello Maciej,
The solution is to add "cmd /c" before of the command.
Por example, you could to write in the section "Exec command" of the Publish Over SSH Plugin:
cmd /c mkdir "D:\MyFolder\"
Also, if you want to run multiples commands, you could write something like the following statement:
cmd /c "echo Hello & echo My Friend"
On the other hand, is better execute a file batch with the lines to execute:
cmd /c "C:\data\scripts\myScript.bat"
regards,
Gianfranco