使用SCP将本地文件从Windows复制到远程服务器 [英] Copying a local file from Windows to a remote server using scp
问题描述
因此,我正尝试通过ssh和scp将文件文件夹从本地计算机传输到服务器。 sudoing之后,我使用以下命令:
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
我收到错误:
ssh:C:名称或服务未知
ssh: C: Name or service not known
我是猜猜它是 c:/ desktop
等的语法。有什么想法吗?
I'm guessing its my syntax for c:/desktop
etc. Any ideas?
顺便说一句,我正在使用腻子+ Windows 7。
BTW I'm using putty + Windows 7.
推荐答案
如果驱动器号为C,则应该可以使用
If your drive letter is C, you should be able to use
scp -r \desktop\myfolder\deployments\ user @主机:/ path / to / whereyouwant / thefile
,不带驱动器号和反斜杠,而不是正斜杠。
without drive letter and backslashes instead of forward slashes.
您正在使用腻子,因此可以使用 pscp 。它更适合Windows。
You are using putty, so you can use pscp. It is better adapted to Windows.
这篇关于使用SCP将本地文件从Windows复制到远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!