Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copying a local file from Windows to a remote server using scp [closed]

So, I'm attempting to simply transfer folder of files from my local computer to a server via ssh and scp. After sudoing I'm using the command as follows:

scp -r C:/desktop/myfolder/deployments/ user@host:/path/to/whereyouwant/thefile 

I get the error:

ssh: C: Name or service not known

I'm guessing its my syntax for c:/desktop etc. Any ideas?

BTW I'm using putty + Windows 7.

like image 500
HelloWorld Avatar asked Jan 23 '12 17:01

HelloWorld


1 Answers

If your drive letter is C, you should be able to use

scp -r \desktop\myfolder\deployments\ user@host:/path/to/whereyouwant/thefile

without drive letter and backslashes instead of forward slashes.

You are using putty, so you can use pscp. It is better adapted to Windows.

like image 53
Serkan Yilmaz Avatar answered Sep 20 '22 07:09

Serkan Yilmaz