Thursday, December 29, 2016

Copy Files via SSH from Another Server FTP

Recently for one of my project our server was hacked and some files were deleted and corrupted with malwares. So we had to restore the old backups. We were using the contabo web server where we have separate backup server with 100 GB space which was accessible only through FTP from the SSH. So in this blog I am going to explain how you can copy files Copy Files via SSH from Another Server FTP.

Step 1: Login to SSH with your SSH username and password. 

ssh yourusername@host

On prompt of password enter password and login.

Step 2 : Go to directory where you want to copy files from FTP.

cd /yourpath/to/folder

Step 3: Connect to FTP

Use following command to connect to FTP

ftp hostname

It will ask for username and password. Once you enter correct username and password, you will get ftp command prompt.

Step 4 : Go to directory from where you want to copy files on FTP.

cd /yourpath/to/folder

You can use cd command on FTP just like you  use on SSH.

Step 5 : Copy Specific File.

Use following command to copy file.

get filename

And wait for the process to be finished.

Step 6 : Exit From FTP

Use following command to close FTP and return back to SSH.


With this you will close the FTP session and you are back to SSH session and you can see the copied files using LS command.

No comments:

Post a Comment