Try this:
*1.* Open the Services management window on the machine hosting the SSH 
server (hit windows key, type "services", select "Services" from the list 
of matches).

*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.

Il giorno mercoledì 20 novembre 2013 08:17:16 UTC+1, Justinas Urbanavicius 
ha scritto:

> Hi, 
>
> Having serious problems with executing remote command through ssh.
> I've set up my Jenkins to ssh to remove Windows platforms, where sshd is 
> installed using cygwin. Connection and publishing remote files works like a 
> charm, but when it comes to command execution every single command fails 
> and Jenkins reports that remove command exited with status code 255 (non 
> zero).
>
> console output:
>
> 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..
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c29a4fad-3922-4c10-9b20-694ab3a95ce0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to