PuTTY is a free and open-source terminal emulator and network file transfer application. This application helps us to handle server environment with commands on the Linux operating system.
In this article, we will see how to transfer files from localhost to server or vice a versa on Linux operating system. For that, you need to install PuTTY and PSCP( PuTTY Secure Copy client to transfer files using SSH) as per your machine configuration. Link below
Download PuTTY: latest release (0.74)
This page contains download links for the latest released version of PuTTY. Currently this is 0.74, released on…
Once you install and setup PuTTY application you need to login to your server with hostname and port number details. Install PSCP as well and login to PuTTY terminal.
Transferring file from localhost to server
//Open a command prompt on your local machine and navigate to your file location
cd file_location//To check files present in current directory
dir//Now transfering file from localhost to remote server
pscp -P 22 filename_from_localhost root@server_ip_address:/server_folder_locationeg.
pscp -P 22 Library_Management.zip firstname.lastname@example.org:/var/www/Library_Management_Project/public_html/
Here 22 is a port number which is common in most of the cases. You can transfer files as well as zip folder. In my case, I am sending entire application files through the zip folder. Once you run this command, it will prompt for the password and you need to enter SSH password over here. Zip file will copy inside public_html folder at the remote server location.
It will show you the progress of file transferring, once it reaches 100% you can check that file using PuTTY by going to that folder and checking all files by typing
Transferring file from server to localhost
//Open command prompt on local machine and change location where you want server file to download
cd folder_location//For transfering file from remote server to localhost
pscp -P 22 root@server_ip_address:/server_folder_location/filename.extension filename.extension
It will ask for the password. Provide SSH password and file will start downloading to the folder location where your common prompt is pointing.
If you pull zip file, then unzip it and delete it after all files are deployed to a remote location
unzip latest.zip//Delete zip folder
unlink folder.zip or rm folder.zip
Hopefully, you guys are clear about the file transfer process. Check out my other articles as well.
ENJOY CODING 🥳
Basic Git Commands
Git is one of the best open-source version controlling tool and widely used in web development companies. It consists…
Deploying Angular and Node Js application on Heroku
In this session, we will deploy our Node Js and Angular application on the Heroku platform.
Beginner’s guide to wireframe
Every mission, every construction needs planning to get a positive result. No matter how small or big house you want to…
LET vs VAR vs CONST
In JavaScipt we have three types of variable declarations which include let, var and const. let and const was…