WinSCP is a very helpful tool that enables easy file transfer between Windows and Linux machines.
SCP is a transfer protocol that based on SSH and as Windows does not have these protocols installed by default so we must install the next best thing.
Your linux machine must have SSH installed, configured and setup. Verify it and SCP are working by logging into your own shell and sending a quick file:
$ ssh user@localhost
$ touch test ; scp test user@localhost:/tmp/test
This should transfer the file test to the location /tmp/test. Doing this quick test will ensure the SCP and SSH protocols are setup and are running correctly. If you did not receive the expected result, I recommend following another one of our other articles that helps with SSHs setup.
Begin by downloading WinSCP on the Windows machine you wish to connect with. Navigate to WinSCPs official site and then click the “Download WinSCP” button, this will download the installer to your system.
Run said installer and follow the following steps:
- Accept (the terms and conditions)
- Full Upgrade (this is recommended)
- Click Next and install.
Once installed, launch the program.
Now define the nix system we want to connect to. Your desired system or server must have SCP enabled as this is the protocol we are going to use. Input your systems details
File protocol: SCP Host name: Linux servers IP Port: SSH port, 22 by default Username: User you login with via SSH Password: Your users password
If this is your first time, you will be greeted with a warning message regarding the unknown servers host key. Saying yes to this prompt is fine, it is only here because we haven’t connected to this server before thus its hosts key hasn’t been saved. Its safe to save it. Continue.
After logging in, you will be brought to the interface of the applications. Here you can see your Windows machine on the left and your Linux system on the right. Transferring files here happens in real time so you will be able to see it populate without any delay.
Congratulations, you’ve just setup and used WinSCP.