Science and technology

Switch recordsdata and folders from Windows to Linux with WinSCP

Sometimes it’s essential to switch recordsdata over a community. There are numerous file sharing companies on the market, however most require that you just ship your file to the Internet. This looks like a protracted solution to go (to not point out the privateness issues) when two computer systems are proper beside one another, or at the very least in the identical constructing. The open supply WinSCP utility makes it fast and straightforward to switch a file or a folder of recordsdata over the community out of your Windows laptop to your Linux laptop.

IP tackle

Before you may make the switch, you will need to know the IP tackle or fully-qualified area title of the vacation spot laptop. Assuming it is a pc in your identical community, and that you just’re not working a DNS server to resolve laptop names, you could find the vacation spot IP tackle utilizing the ip command on the Linux machine:

[linux]$ ip addr present | grep 'inet '  
inet 127.0.0.1/8 scope host lo  
inet 192.168.1.23/24 brd 10.0.1.255 scope world noprefixroute eth0  

In all circumstances, 127.0.0.1 is a loopback tackle that the pc makes use of solely to speak to itself, so on this instance the proper tackle is 192.168.1.23. On your system, the IP tackle is prone to be totally different. If you are unsure which is which, you possibly can strive each in succession till you get the correct one (after which write it down someplace!)

Alternatively, you possibly can look in your router’s settings, which record all addresses assigned over DHCP.

Firewalls and servers

The WinSCP command makes use of the OpenSSH protocol, so your Linux laptop should be working the OpenSSH server software program, and its firewall should permit SSH site visitors.

If you are unsure whether or not your Linux machine is working SSH, then run this command on the Linux machine:

[linux]$ sudo systemctl allow --now sshd

To guarantee your firewall permits SSH site visitors, run this command:

[linux]$ sudo firewall-cmd --add-service ssh --permanent

For extra data on firewalls on Linux, learn Make Linux stronger with firewalls.

Using WinSCP

WinSCP is an open supply SSH file switch software for Microsoft Windows. To use it, you first should download and install it.

Once you are put in it, open WinSCP and choose the SCP possibility within the File Protocol discipline.

Add the IP tackle or DNS title of your Linux laptop within the Host title discipline, and enter 22 within the Port quantity discipline. Enter you consumer title and password for the Linux laptop, after which click on the Login button on the backside of the WinSCP window.

(Paul Laubscher, CC BY-SA 4.0)

Verify that you’re authenticated to the Linux laptop. Upon success, your Linux laptop’s IP tackle or DNS title seems on the prime of the window.

(Paul Laubscher, CC BY-SA 4.0)

 

Now you possibly can drag and drop a file (I used winscp-test.txt for example) from the left Windows pane to the vacation spot Linux laptop pane on the correct, and the file transfers.

(Paul Laubscher, CC BY-SA 4.0)

Alternatively, you possibly can right-click on a file within the left pane and add it to the distant vacation spot in the correct pane.

(Paul Laubscher, CC BY-SA 4.0)

Verify the copy

Open a Linux terminal and use the ls command to view the transferred winscp-test.txt file. In my instance, it seems in my house listing, /_home_/sysadmin.

$ ls
Desktop
Documents
Downloads
Music
Pictures
pscp-test.txt
[...]

You’ve efficiently transferred a file from a Windows laptop to a Linux laptop over the community!

Of course, you should use the identical method as above to switch recordsdata and folders from a Linux laptop to a Windows laptop.

Remote copying

With the ability of the open supply WinSCP software, you have got entry to any laptop in your home or office, to servers you have got accounts on, and even cell, edge, and Internet of Things gadgets. Use this useful gizmo to switch recordsdata as simply as you’d copy a file from one native listing to a different!

Most Popular

To Top