linux - 如何使用 winscp 控制台将文件从远程 Windows 8 服务器传输到 Linux 服务器

标签 linux windows scp winscp

我目前连接到 Windows 服务器。我在上面安装了winscp。我运行 winscp 并连接到 linux 服务器。现在在 winscp 的 gui 上,我单击控制台,然后使用 scp 命令。远程服务器上的文件是 C:\xampp\htdocs\android\files\file.txt 现在我想将它传输到我的 linux 服务器。我计划使用像 python 这样的应用程序来自动执行此操作。但问题是我的代码不正确。老实说,我真的不明白。所以请指导我。

这是我想做的。

scp C:\xampp\htdocs\android\files\file.txt remote_server_ip_add@linux_ip_add:/home

不知道对不对。它只是不起作用。

例如,远程服务器的用户名是“Remote_server”。例如,linux 服务器的用户名是“linux_Server”。

应该是这样吗?

scp C:\xampp\htdocs\android\files\file.txt remote_server@linux_server:/home

我也遇到了这个错误

C: node name or service name not known

最佳答案

语法是

scp local_file remote_login@remote_server:/remote/path

你们在交换条件。在你的情况下,远程是一台 linux 机器。对于 winscp,windows 将是本地的。

然后,如果它能够连接到指定的服务器,它将使用您的证书进行身份验证,如果失败,则要求指定用户的密码。

关于linux - 如何使用 winscp 控制台将文件从远程 Windows 8 服务器传输到 Linux 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20510060/

相关文章:

linux - 在 Perl 调用之前获取命令的退出代码

c - 修补源代码中同一行时出现问题

c# - 处理多个表单之间的数据

CUDA:在内核执行时修改主机的映射内存

linux - rsync ssh 递归试运行错误/服务器上没有 rsync

linux - 使用 sed 命令删除文件中的反斜杠

linux - 在 Armbian(在 Orange Pi Zero 上)上安装 .Net 5 运行时时出现错误

linux - 我如何在 Linux Vagrant VM 中设置我的桌面用户,以便它像标准工具控制台一样使用我常用的用户名、ssh key 等?

linux - scp 命令不适用于在 Linux 中复制目录

backup - SCP无法正常工作,其目录错误