使用 scp 将本地文件从 Windows 复制到远程服务器 [英] Copying a local file from Windows to a remote server using scp

查看:43
本文介绍了使用 scp 将本地文件从 Windows 复制到远程服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我试图通过 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?

顺便说一句,我正在使用 putty + Windows 7.

BTW I'm using putty + Windows 7.

推荐答案

如果你的盘符是C,应该可以使用

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

scp -r desktopmyfolderdeployments user@host:/path/to/whereyouwant/thefile

没有驱动器号和反斜杠而不是正斜杠.

without drive letter and backslashes instead of forward slashes.

你正在使用 putty,所以你可以使用 pscp.它更适合Windows.

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

这篇关于使用 scp 将本地文件从 Windows 复制到远程服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆