Question

How to download file from digital ocean droplet ?

Posted March 4, 2018 20.9k views
UbuntuDigitalOcean

i want to download file from my digital ocean droplet to my local server

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

one method you can use is scp

scp username@droplet_ip:/path/to/file /path/to/destination

update the items in red to match your situation.

  • from where should i execute this cmd

    • You can execute this command from either the destination, source, or even a different machine.

      From destination:
      scp username@droplet_ip:/path/to/file /path/to/destination

      From source:
      scp /path/to/file username@destination_host:/path/to/destination

      From elsewhere:
      scp username@source_ip:/path/to/file username@destination:/path/to/destination

      • I just get the following error

        zsh: no matches found: username@source-ip:/path/to/file/trying/move

        This is what i used from a Macbook (the destination):
        scp username@source-ip:/path/to/file /path/to/destination

        I am sure that file path is correct, running rsync from my destination to droplet works fine, its the other way round where i cant get it to work

  • @jasonjpeters i want to download my .py file from ubuntu VPS to my local computer server,plz tell from where should i execute the command & what would be path to file?

    • As I do not know what OS you are using I cannot tell you what to do specifically.

      If you are using Linux you can use the noted commands above adjusting them to suit your setup.

      OR

      You can install a program like Cyberduck (Windows/Mac) and connect to your server via FTP/SFTP and download the file using this application.

I have this message
$ scp root@server:/var/www/ /home/destination/
The authenticity of host ‘server (server)’ can’t be established
.
ECDSA key fingerprint is SHA256:xxxxxxxxx.
Are you sure you want to continue connecting (yes/no)?