[英]How to copy files on remote Windows to local Linux on a Linux machine?
Currently, I'm working on a local Linux machine. 目前,我正在本地Linux机器上工作。 I'm trying to use scp or similar Linux command-line tools to copy files from a remote Windows machine to my local Linux.
我正在尝试使用scp或类似的Linux命令行工具将文件从远程Windows计算机复制到我的本地Linux。 I did some searching and found that most of the solutions are for local Windows cases (like putty and winscp), which don't really help.
我进行了一些搜索,发现大多数解决方案都适用于本地Windows案例(例如,腻子和winscp),但实际上并没有帮助。
Please advise.Thank you. 请指教。谢谢。
[UPDATE] Solved by installing cygwin's sshd service on Windows. [更新]通过在Windows上安装cygwin的sshd服务来解决。
If the windows system has a shared folder you should be able access that with smbclient which is part of the terrific samba project. 如果Windows系统具有共享文件夹,则应该可以使用smbclient来访问该文件夹,这是出色的samba项目的一部分。
Usually somthing like: 通常是这样的:
smbclient //winmachine/share
Possibly using the -U username
options to specifiy the username on the windows box. 可能使用
-U username
选项来指定Windows框中的用户名。
Once connected, you can use cd
to change folders, and get
to retrieve files. 一旦连接,您可以使用
cd
来更改文件夹,并get
检索文件。
If there is no file share.... I dunno. 如果没有文件共享...。我不知道。 Create one?
创建一个?
If you really want to use SCP, you will need an SCP server (actually an SSH server) on the Windows machine. 如果您确实想使用SCP,则在Windows机器上将需要一个SCP服务器(实际上是SSH服务器)。
For example freeSSHd . 例如freeSSHd 。
You will need to choose one of the options based on your own needs, there are a number of similar tools and freeSSHd was the first in the list on Google. 您需要根据自己的需要选择一个选项,有很多类似的工具,并且freeSSHd在Google列表中排名第一。 I've used the Bitvise SSH Server in the past but it is only free for non-commercial use.
我过去曾使用过Bitvise SSH服务器 ,但它仅可用于非商业用途。
They are usually very easy to set up. 它们通常很容易设置。 You install them the usual way and run them for the first time.
您以通常的方式安装它们并第一次运行它们。 Depending on the tool, they may pick up your existing Windows users or you may need to manually create some users with passwords within the tool.
根据工具的不同,他们可能会选择您现有的Windows用户,或者您可能需要在工具内使用密码手动创建一些用户。 Then, armed with your PC's IP address, you should be able to connect to the PC using SSH from the Linux command line.
然后,使用PC的IP地址,您应该能够从Linux命令行使用SSH连接到PC。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.