Linux – SCP copy windows local file to linux remote folder

centoslinuxscpwindows

How to get a file from my path d:/test.txt and copy it to /etc/var/test/test.txt?

I've tried this:

scp d:/test.txt /etc/var/test/test.txt

but that didn't work.

How do I set the hard disk from where I copy my files?

Best Answer

Umm, if you're using cygwin you want that command to look like

scp /cygdrive/d/test.txt <linux ip>:/etc/var/test/test.txt

Or you can use WinSCP, you'll probably find that simpler.