简体   繁体   English

如何将文件从Windows便携式计算机复制到Linux远程服务器

[英]How to copy file from Windows laptop to Linux remote server

There are already quite a few topics on this issue here on StackOverflow 在StackOverflow上已经有很多关于此问题的主题

However, I have spent the last 3 hours trying all of them, but am unable to fix this. 但是,我花了最后3个小时尝试了所有方法,但无法解决。

I am trying to copy a file from my laptop to a remote linux server 我正在尝试将笔记本电脑中的文件复制到远程Linux服务器

My laptop uses Windows 8.1 我的笔记本电脑使用Windows 8.1

The remote server is Debian. 远程服务器是Debian。

I am connected to the Linux server via a PUTTY. 我通过PUTTY连接到Linux服务器。

If I was using a linux machine, it would be as easy as ABC 如果我使用的是Linux机器,那将和ABC一样容易

But, as my laptop is Windows...............well......... 但是,因为我的笔记本电脑是Windows ..................

Here is the command I've tried : 这是我尝试过的命令:

pscp C:\\Users\\Michael Storm\\Desktop\\Folder\\public_key.ppk mstorm@my.linux.server:/home/mstorm pscp C:\\ Users \\ Michael Storm \\ Desktop \\ Folder \\ public_key.ppk mstorm@my.linux.server:/ home / mstorm

mstorm --- my username on the linux server (and also my home-directory) mstorm-我在Linux服务器上的用户名(以及我的主目录)

public_key.ppk --- the file I'm trying to copy to the linux server public_key.ppk-我要复制到Linux服务器的文件

C:\\Users\\Michael Storm\\Desktop\\Folder\\public_key.ppk --- the filepath (on my laptop) C:\\ Users \\ Michael Storm \\ Desktop \\ Folder \\ public_key.ppk ---文件路径(在我的笔记本电脑上)

(Just to be clear : there is a space-break between " public_key.ppk " and " mstorm ". This forum carried over the second half of my command to the next line) (请注意:“ public_key.ppk ”和“ mstorm ”之间有一个空格。该论坛将我命令的后半部分移至下一行)

This command gave me the error : UNKNOWN COMMAND PSCP 此命令给了我错误: 未知命令PSCP

So, I changed " PSCP " to " SCP ", and I got the error : 因此,我将“ PSCP ”更改为“ SCP ”,但出现错误:

ssh: Could not resolve hostname C: Name or service not known Permission denied (publickey). ssh:无法解析主机名C:名称或服务未知拒绝权限(公钥)。 lost connection 失去了连接

In addition, I should mention : I cannot use any File Transfer clients (like FileZilla, or WinSCP), because : I connect to the linux server via a public key. 另外,我应该提到:我不能使用任何文件传输客户端(例如FileZilla或WinSCP),因为:我通过公共密钥连接到linux服务器。 There is no password. 没有密码。

FTP clients require a password to connect. FTP客户端需要密码才能连接。

As windows does not have direct ssh connection, you cannot do it. 由于Windows没有直接的ssh连接,因此您不能这样做。 Let me give an example, assume that you have multi OS(windows, Centos) installed in single machine. 让我举个例子,假设您在一台计算机上安装了多个OS(Windows,Centos)。 You can mount windows partition in Linux. 您可以在Linux中挂载Windows分区。 Thus you can see your windows file from Linux. 因此,您可以从Linux查看Windows文件。 And you can easly copy or delete windows files from Linux. 而且,您可以轻松地从Linux复制或删除Windows文件。 However you cannot easly mount Linux partitions to Windows. 但是,您无法轻松地将Linux分区安装到Windows。 However there is some 3th party applications that you can do(I have never tried!) 但是,您可以执行一些第三方应用程序(我从未尝试过!)

For your simple question, you can use WinSCP . 对于您的简单问题,可以使用WinSCP Install WinSCP to your Windows and make connection to your Linux. 将WinSCP安装到Windows并连接到Linux。 It is like putty with GUI. 就像使用GUI的腻子一样。 You can make direct connection to your linux and copy your files from Linux to Windows and vice-versa. 您可以直接连接到Linux,并将文件从Linux复制到Windows,反之亦然。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 How ansible copy file from remote windows to remote linux without local copy and ssh install in windows - How ansible copy file from remote windows to remote linux without local copy and ssh install in windows 如何使用C将文件从Linux复制到Windows Server - How to copy file from linux to windows server using c 将pscp文件从窗口服务器复制到远程linux服务器 - copy pscp a file from window server to to remote linux server 使用staf将文件从linux复制到远程Windows机器 - Copy file from linux to remote windows machine using staf 从 .csv 文件复制到远程 PostgreSQL 数据库(在 Linux 服务器中运行) - COPY FROM .csv file to a remote PostgreSQL Database (Running in Linux Server) 自动将日志文件从远程 linux 服务器下载到 windows 服务器 - Automating a log file downloading from a remote linux server to a windows server 如何使用 Ansible 剧本将文件从 Linux 服务器复制到 Windows 服务器 - How to copy a file from Linux server to Windows server using Ansible playbook 如何将文件从远程Linux机器复制到JSP Web目录 - How to copy file from remote linux machine to JSP web directory 我们如何将工件从Linux复制到Windows服务器? - How can we copy the artifacts from Linux to Windows server? 如何将远程Windows上的文件复制到Linux计算机上的本地Linux? - How to copy files on remote Windows to local Linux on a Linux machine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM