SCP task on deployment from Linux server to windows server is stuck on upload
Asked by Livhuwani Netshiumoni:

I have enabled a sshd on destination server but still it doesnt work

24-Jun-2019 15:40:57 Build Deployment of 'release-5' on 'DEV' started building on agent agent4   
24-Jun-2019 15:40:57 Remote agent on host agent4  
24-Jun-2019 15:40:57 Build working directory is /root/bamboo-agent-home/xml-data/build-dir/45701010-719002001  
24-Jun-2019 15:40:57 Executing build Deployment of 'release-5' on 'DEV'  
24-Jun-2019 15:40:57 Starting task 'Clean Working directory' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:cleanWorkingDirectoryTask'  
24-Jun-2019 15:40:57 Cleaning working directory '/root/bamboo-agent-home/xml-data/build-dir/45701010-719002001  
24-Jun-2019 15:40:57 Finished task 'Clean Working directory' with result: Success  
24-Jun-2019 15:40:57 Starting task 'Download release contents' of type 'com.atlassian.bamboo.plugins.bamboo-artifact-downloader-plugin:artifactdownloadertask'  
24-Jun-2019 15:40:57 Preparing to download plan result TESTING-99 artifact: Non required shared artifact: \[test\], pattern: \[\*\*/\*\] anchored at: \[dist\]  
24-Jun-2019 15:40:58 Artifact \[test\]downloaded successfully in 858.0 ms to working directory  
24-Jun-2019 15:40:58 Finished task 'Download release contents' with result: Success  
24-Jun-2019 15:40:58 Starting task 'config' of type 'com.atlassian.bamboo.plugins.bamboo-scp-plugin:scptask'  
24-Jun-2019 15:40:59 Connecting to *servername* on port: 22  
24-Jun-2019 15:41:00 Performing a recursive copy...  
24-Jun-2019 15:41:00 Uploading 'index.html'...  
24-Jun-2019 15:41:00 Uploading 'styles.js'...  
24-Jun-2019 15:41:00 Uploading 'favicon.ico'...  
24-Jun-2019 15:41:00 Uploading 'styles.js.map'...  
24-Jun-2019 15:41:00 Uploading 'main.js.map'...  
24-Jun-2019 15:41:00 Uploading 'polyfills-es5.js.map'...  
24-Jun-2019 15:41:00 Uploading 'polyfills.js'...  
24-Jun-2019 15:41:00 Uploading 'runtime.js.map'...  
24-Jun-2019 15:41:00 Uploading 'main.js'...  
24-Jun-2019 15:41:00 Uploading 'vendor.js.map'...  
24-Jun-2019 15:41:00 Uploading 'vendor.js'...  
24-Jun-2019 15:41:00 Creating remote directory 'assets'...  
24-Jun-2019 15:41:00 Uploading 'polyfills.js.map'...  
24-Jun-2019 15:41:00 Uploading 'runtime.js'...  
24-Jun-2019 15:41:00 Uploading 'polyfills-es5.js'...  
24-Jun-2019 15:41:00 Uploading '/root/bamboo-agent-home/xml-data/build-dir/45701010-719002001/index.html' to 'C:/teamportal'...


Answers:
author: Daniel Santos
body: Hi [@Livhuwani Netshiumoni](/t5/user/viewprofilepage/user-id/3353910)

The SSH task is not 100% compatible with every SSH servers for windows. We have a ticket open for improvements in this task:

* [\[BAM-16279\] Provide better support for SCP to Windows servers](https://jira.atlassian.com/browse/BAM-16279)

You will see there that to make this task work properly you will need to use one of the options below.

* [Cygwin SSH Server](https://www.cygwin.com/ "Follow link")
* [MobaSSH](http://mobassh.mobatek.net/ "Follow link")

In order to test this, I've installed MobaSSH and the following configuration was used to copy data to **C:\\folder**:

```
/cygdrive/c/folder
```

The same would be used for a different drive. e.g. **E:\\folder** would be:

```
/cygdrive/e/folder
```

?? Please notice the use of forward slashes instead of backslashes.

I hope that helps.

comments: author: Livhuwani Netshiumoni
body: [@Daniel Santos](/t5/user/viewprofilepage/user-id/502125) i used MobaSSH it worked perfectly

Thank you


author: Daniel Santos
body: You are welcome!  
I'm glad the issue is solved =\]


author: Livhuwani Netshiumoni
body: :) Issue resolved and artifacts transferred


author: Daniel Santos
body: Awesome! =\]


author: Livhuwani Netshiumoni
body: I test Cygwin also it worked the magic. :)


author: Daniel Santos
body: Thank you so much for confirming this one as well! =\]