How do I transfer a file from linux to windows?

Can you tell me how to transfer a file from a linux machine to windows? What tools should I use for this? I've been Googling for a day - as if this problem requires some non-trivial solution. Nothing is clear.

Author: Василий, 2018-08-21

2 answers

FTP, Samba, SSH, RSYNC, SCP, WebDAV, Git... It depends on what you do. You can mount network drives, transfer files over the network, and use FTP / SFTP clients. You can use clouds.

To synchronize files during development, usually use RSYNC/SSH.

If this is a single local network, you need/can use a Samba server and mount Linux directories in Windows as network drives.

Plus

  • You can raise the FTP server on Linux and connect via a client (for example, FileZilla), but FTP is not secure.
  • You can use WinSCP and connect via SSH/SFTP.
  • You can use clouds, such as Yandex.Disk/Amazon (but this is exotic for simple tasks).
  • You can use the utilities built into the IDE (for example, in PHP/WebStorm)
  • If these are public server files, you can use CURL/Wget

In some SSH clients, it is possible to transfer a file via normal interface.

Linux to Windows

As you understand, this is not a trivial task. Linux and Windows authentication systems are different. To transfer files in Windows, you can for example: create a shared resource and use sambaclient to transfer files, but why? Think again about your task, why do you need it this way? You can create tunnels, install an FTP / SSH server on Windows, etc., but most likely, this is not necessary at all and is unnecessarily difficult. Review the very the ideology of working in heterogeneous environments. Don't try to replicate the windows experience on Linux. Good luck.

 4
Author: diproart, 2018-08-21 07:57:21

If the servers are on the same network: the simplest thing you can think of is to make a network folder on a win machine and mount it in linux using smbclient, for example in /mnt/winserver

Then put the necessary files there by the crown.

If the servers are in different segments or secure file transfer is required, then you can install an ssh server on windows, then you can transfer from linux using the scp{[1] command]}

So that you don't have to ask for a password every time you transfer files set up authorization by key

 1
Author: zersh, 2018-08-23 08:00:27