4

I am trying to copy a directory from a remote AWS instance to my local instance.

I have not ssh'ed into the remote instance unlike the user in this question

I simply run the command:

scp -r user@remotehost:/path/to/dir/on/remote/instance /C:/Users/example/user/path/to/destination 

I type the server password in

I then get the error message:

/C:/Users/example/user/path/to/destination: No such file or directory 

relating to the local instance path

Has anyone got any ideas why this is happening?

Edit: Using Gitbash on a local windows instance

Thanks in advance John

3
  • From the tags you are using, I assume you are running the scp command from withing the Bash shell that comes with Git for Windows. Is this correct? Commented Feb 20, 2019 at 12:44
  • I am using gitbash within a windows instance Commented Feb 20, 2019 at 12:45
  • Thanks, you gave me the information I needed to answer. Can you edit your question so that the shell you use is more visible? And welcome to SuperUser! Commented Feb 20, 2019 at 12:52

1 Answer 1

2

In Git Bash on Windows, disk names are lowercase and don't have colons.

So instead of:

/C:/Users/example/user/path/to/destination 

In Git Bash, you should use:

/c/Users/example/user/path/to/destination 

Alternately, in WSL (the preferred way to run Linux programs on Windows):

/mnt/c/Users/example/user/path/to/destination 
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.