SSH: Connecting session ... SSH: Connected SSH: Opening SFTP channel ... SSH: SFTP channel open SSH: Connecting SFTP channel ... SSH: Connected SSH: Remote root is not absolute, getting absolute directory from PWD SSH: cd [/cygdrive/d/WWW] SSH: OK SSH: cd [builds] SSH: OK SSH: mkdir [jenkins-UAT-20] SSH: OK SSH: cd [jenkins-UAT-20]SSH: OK SSH: put [archive.zip]SSH: OK SSH: Opening exec channel ... SSH: EXEC: channel open SSH: EXEC: STDOUT/STDERR from command [pwd;] ... SSH: EXEC: connected SSH: EXEC: completed after 201 ms SSH: Disconnecting configuration [UAT/PROD] ... ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [255]]
Build step 'Send files or execute commands over SSH' changed build result to FAILURE
I'm using "Publish Over SSH" plugin v1.10, and as you can see even pwd command fails.
if i connect from remote machine my self and try to execute the same commands they work like a charm and exit status is normal == 0.
Remote machine i connect to is Windows 2003 x64 Server.
I have a similar setup with Windows 2008 R2 and it works great.
Does anyone have any suggestions ? I'm stumped here..
2. Find the service (should be 'OpenSSH') and open it's properties
3. Switch to Log On tab
4. Change the service credentials the service is running with: instead of local system user, choose the user you are using to establish the SSH connection.
5. Restart service.
Alternative is to fix local system user account (probably environment variables) so it works as local system user.