1

I have to copy a file from my local machine to a remote server. The problem is, from what I'm understanding, is the space in my username ("User Name").

I've tried the following in command prompt:

scp -rv C:\Users\User Name\Downloads\filename.c [email protected]:/home/student/username 

But it's telling me:

C:/Users/User: No such file or directory Name/Downloads/filename.c: No such filSink: \001scp: C:/Users/User: No such file or directory e or diSink: \001scp: Name/Downloads/filepath.c: No such file or directory rectory ... debug1: Exit status 1 

I've also tried removing my initial "C:" and "C:\Users\User Name" and removing the space in "User Name" from the command but it still doesn't copy and gives the same response.

Is there any other way I could copy or am I doing something wrong myself with that prompt?

3
  • 1
    Try scp -rv "C:\Users\User Name\Downloads\filename.c" [email protected]:/home/student/username Commented Jun 9, 2021 at 20:41
  • @Bodo it worked! Thank you so much! Commented Jun 9, 2021 at 20:46
  • I wrote it as an answer. Commented Jun 9, 2021 at 21:00

1 Answer 1

0

Use quotes around file names that contain spaces

scp -rv "C:\Users\User Name\Downloads\filename.c" [email protected]:/home/student/username 

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.