How to use SSH Transfer Protocol with PuTTy In Linux
One of the easiest methods to transfer files from Linux (Ubuntu) to Windows OS is to use PuTTy pscp (PuTTy Secure Copy Client). PuTTy is used to create a client-server link to connect both platforms via a Wireless connection. PuTTy is a free open-source SSH client which works across multiple platforms and has become a mode for easy file transfers across platforms.
Step 1: To start with Install SSH if you don’t have it in your Linux OS. Follow the Command prompt codes to do so.
Ubuntu/Debian OS
sudo apt update
sudo apt install ssh-server
sudo service ssh start
Red Hat and other Linux-based OS
sudo yum install openssh-server
sudo systemctl start sshd
Step 2: Install PuTTy in your system if you don’t have it. Otherwise, ignore this step. If you want to install PuTTy in your Linux OS, follow the command prompt lines below:
For Ubuntu and Linux Mint OS
For Ubuntu, you’ll need to access the universal repository available and install PuTTy there. Hence, there are additional commands to access the universal repository below:
sudo add-apt-repository universe
sudo apt update
sudo apt install putty
For Debian OS
sudo apt-get putty
For Arch Linux OS
sudo pacman -S putty
For RHEL, Fedora, CentOS, AlmaLinux
sudo dnf install putty
For others
sudo yum install putty
Now you have successfully installed PuTTy in your Linux OS. Now, you can use it for file transfer from Linux to Windows and vice-versa. Similarly, you can also download PuTTy in Windows OS.
Step 3: Transfer files across different OS.
It becomes easy using PuTTy pscp (PuTTy Secure Copy Client). Simply provide the source path and the destination paths for file transfer and the files would be transfered.
In this case, the IP address of a sample Linux system is 192.168.0.18. Let’s see the skeletal structure of the command prompt line we’ll need to type:
[path_where_pscp_is_downloaded]>pscp user@[host:source destination]
Example 1:
For example, assume that PuTTy pscp is downloaded on the Windows Program Files directory and we’ll need to transfer files from Linux to Windows OS to send a file called “a.txt”. Follow the command prompt code below:
C:\Program Files\PuTTY>pscp user@192.168.0.18:/tmp/a.txt \Users\<username>
Example 2:
For vice-versa, to store the file in a new directory follow the code below:
Important: Check whether the directory exists or else, you’ll get an error. You can use the following command to create a new directory:
mkdir <directory_name>
C:\Program Files\PuTTY>pscp \Users\<username>\a.txt user@192.168.0.18:/<directory_name>
Now, you’ve successfully transferred files from Linux OS to Windows OS and vice-versa.
How To Transfer File From Linux To Windows?
There are many reasons why many people need to transfer files across Linux to Windows OS, be it for work, or for platform compatibility. Rest assured, this kind of file transfer is relatively effortless to do so. It is well-known that transferring files from Linux to Windows is scary and vice versa.
In this article, we’ll go through how to send files across Linux to Windows and vice versa easily.
Table of Content
- Method 1: Using SSH Transfer Protocol with PuTTy
- Method 2: Using FTP with FileZilla or Shared Network Folders
- Method 3: Using SMB Protocol
Contact Us