Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

scp task fails with error as no such file or directory

Mahesh
Contributor
May 20, 2025

Hi,

I am using scp task to copy artifacts to server. But everytime it fails with error as no such file or directory.

it is not able to recognise remote path.
I tried below:
"C:\\Users\\user\\Desktop\\test\\"
"C:\Users\user\Desktop\test\"

"C:/Users/user/Desktop/test/"

"C/Users/user/Desktop/test/"

cygwindir/C/Users/user/Desktop/test/
with single quotes, without quotes. Nothing worked for me.

Please help me herescpTask-error.png

1 answer

0 votes
Jeremy Owen
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2025

Hi Mahesh,

What blend of SSH server are you using on the target Windows server? If it's OpenSSH you might be running into the below bug:

Both Cygwin SSHD and MobaSSH are known to handle the paths better out-of-the-box but I'd recommend starting with the workaround on the bug report to set the default shell for OpenSSH to Powershell and see if that helps first.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events