简体   繁体   English

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

OS: Wk16 vs Debian 10.4 Ansible: 2.9操作系统:Wk16 与 Debian 10.4 Ansible:2.9

Hi all大家好

I need to send a file from remote Windows to remote linux without to copy in local without to install ssh package in Windows server. I need to send a file from remote Windows to remote linux without to copy in local without to install ssh package in Windows server.

A Win_server <-- Ansible role executor -- B Ansible_host         C linux_host
|
|                                                                   ^
|___SENDING FILE_______________________________________TO___________|

Thank's a lot非常感谢

Checkout syncronize module at Ansible Documentation: https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html Checkout syncronize module at Ansible Documentation: https://docs.ansible.com/ansible/latest/collections/ansible/posix/synchronize_module.html

Also, be aware to stablish direct ssh connection between targets.此外,请注意在目标之间建立直接 ssh 连接。

Hint: It's possible to activate ssh on windows and stablish connection to the linux machine.提示:可以在 windows 上激活 ssh 并稳定与 linux 机器的连接。 Take care of the risks!小心风险!

Other way is to use fetch and copy to do the triangle copy using Ansible server as elbow.另一种方法是使用 fetch 和 copy 使用 Ansible 服务器作为肘部进行三角形复制。

Today I putted the SSH in Windows how @guistela sayed.今天我将 SSH 放在 Windows 中,@guistela 是这么说的。

I Installed "Posh-SSH" on Windows host with ansible:我用 ansible 在 Windows 主机上安装了“Posh-SSH”:

  1. Manual Download from: https://www.powershellgallery.com/packages/Posh-SSH .手册下载地址: https://www.powershellgallery.com/packages/Posh-SSH
  2. Send file to Windows host contains files to send.发送文件到 Windows 主机包含要发送的文件。
  3. Install with microsoft steps: Installing PowerShell modules from a NuGet package .使用微软步骤安装: 从 NuGet package 安装 PowerShell 模块
  4. Possh-SSH use commands, more info here: powershell-scp-to-transfer-files-between-windows-linux : Possh-SSH 使用命令,更多信息在这里: powershell-scp-to-transfer-files-between-windows-linux
  • Open ports开放端口
  • Send file发送文件
  • Close ports关闭端口

This 4 general steps permits send files from windows to linux hosts.这 4 个通用步骤允许将文件从 windows 发送到 linux 主机。

Cordially亲切地

暂无
暂无

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

相关问题 如何将文件从Windows便携式计算机复制到Linux远程服务器 - How to copy file from Windows laptop to Linux remote server 如何将远程Windows上的文件复制到Linux计算机上的本地Linux? - How to copy files on remote Windows to local Linux on a Linux machine? 是否可以将文件从本地 windows 目录复制到远程 linux 目录? - Is it possible to copy files from local windows directory to remote linux directory? 使用staf将文件从linux复制到远程Windows机器 - Copy file from linux to remote windows machine using staf 如何通过创建不通过SSH的目录将文件从本地服务器复制到远程服务器? - How can I copy file from local server to remote with creating directories which absent via SSH? 当我通过 Git Bash 中的 ssh 在远程 Linux 机器上运行命令时,如何将文件的内容直接复制到我的 Windows 剪贴板中? - How can I copy the contents of a file directly into my Windows clipboard when I'm running the command on a remote Linux machine via ssh in Git Bash? 如何使用scp将文件从远程计算机(运行Linux)复制到Windows计算机? - How do I copy files from a remote computer (running Linux) to my Windows computer using scp? 如何从远程ssh连接上运行的tmux(复制模式)复制到本地剪贴板 - How do you copy from tmux (copy mode) running on a remote ssh connection to your local clipboard 将文件从本地机器复制到远程机器 - Copy file from local machine to remote machine 使用 cat 将文件从远程复制到本地 - copy a file from remote to local using cat
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM