2

I have a digitalocean account, & i have ssh access to one of the droplet i created . I want to transfer a large file from this droplet ( server ) to my hostgator account ( i have a FTP enabled on Hostgator ) .

So how can i do it ? transfer those files from ssh to FTP account ? Thank you

  • 1
    Do you have ssh enabled on Hostgator? If so just use sftp. Otherwise it gets trickier – roaima Oct 14 '15 at 17:44
  • Do you have an ftp client on your droplet ? – X Tian Oct 14 '15 at 18:28
  • No i do not have ftp client on my droplet, but i have the ssh enabled on my hostgator account ... I tried to use sftp to transfer but i didn't work . – elarib Oct 14 '15 at 20:41
2

If you've got ssh enabled on your Hostgator server, then you could give the scp command a try, it is fast & you've got plenty of options to work with it. You'd perform it as follows:

Copy files and folders to/from different hosts.

Login to you Hostgator server through your preferred terminal app by typing:

ssh user@IPX.XXX.X.XX

replace "user" and "IPX.XXX.X.XX" with your Hostgator's server real username and IP address. Always have your ssh password or key ready, as it'll be requested all the way through those steps.

---//---

After successfully connected to your Hostgator server, use the cd command to navigate to the folder where you want to download files to. e.g:

cd /var/www/any_folder/ - it could be any folder structure that exists within your server, please update it according to your needs.

Then use the command bellow to grab the file from your Digitalocean's remote server (droplet) and download it to the folder on your Hostgator server, right where you've just navigated to with the cd command like the example above.

scp -rp user@droplet_IP:/var/www/any_folder/large-file.zip .

In details:

scp - scp allows files and folders to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh.

-rp - Copies recursively, including all subdirectories, respecting the same folder structure.

user - The server's (droplet) real ssh username

droplet_IP - The server's (droplet) real IP address

:/var/www/any_folder/large-file.zip - Denotes the full path to the file or folders on your droplet, where your large file is stored.

. - A dot "." in the end denotes the absolute path to an exact folder structure. In this case, the exact path is the path you've navigated to with cd, so you'd use a dot "." to tell scp it is the place where you want to download files to.

Transferring files directly without using cd from your Digitalocean's droplet to your Hostgator server:

  • Simply fire up the command bellow:

scp -rp user@droplet_IP:/var/www/any_folder/large-file.zip /var/www/my_hostgator_folder

Again, you'd need to change the constants within the command above to match both your servers details. Also, don't forget to update both folder paths.

Good Luck.

1

From your digitalocean account, logon via ssh and then use ftp command to upload to your hostgator account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.