Transfer files from server to server by using SSH is very convenient. You can use the server’s download and upload speed to transfer files.
Login to your old server from which you want to copy or transfer files. You can use any SSH terminal like PuTTY or MacBook’s Terminal.
in most cases username is root and hostname is your server IP address
In normal case SSH/SFTP port number is 22. By any chance if your servers’ port number is different then you have add your port number like this
ssh firstname.lastname@example.org -oPort=2200
System will ask for password, just type it and enter the server.
Now using terminal go to your desired folder location. In my case I want to zip and and download the whole pulic_html folder of my website.
Now You have to zip the whole public_html folder using the command below.
tar -cvzf siteBackup.tar.gz public_html
File transfer from old server to new server using SSH
On the same terminal login to your destination server.
Now go to your desired folder location.
Copy the file from the old server to this new server using the command below.