Wondering how to download or upload files from your Ubuntu Digitalocean droplets via SSH to your local system storage, well I have tried a lot of things and I will share with you, what actually worked for me.

In one of my recent blog post, I talked about using VPS for Bug Bounty Automation, yeah, which me my self I use and I love it, so at some point in time I was doing some recon and I had to pass the probed domains from httprobe, a tool by Tomnomnom to EyeWitness, to see what’s up with those domains.

Now the images were ready, But how will I view this images, this is a terminal, not a GUI where there is Finder or File Manager where you go to click images one after the other.

So on terminal what is common for viewing images are feh, display, imcat, preview, TerminalImageViewer and many more.

I installed display and even preview, Imagick and any image viewing tools you could probably find out there but was getting errors, this and that, trying to view this images,

So I decided to move the images from my Ubuntu VPS to my System Local Storage, that was the next solution that came to my mind.

So I searched around to see if I could get an article that explained that already, tried out few commands, most of them were SCP related anyway, but nothing worked out, I left my system to get some other things done, so I came back to it, after seeing another solution.

Most of those solution given was not working for me anyway, but I found one which later worked, but even after getting it, I was not doing it in the correct way, I will explain this aspect later, but below is the command that worked for me.

Download Files From Remote Server Using SCP

download files from remote server using ssh:scp

$ scp username@127.0.0.1:EyeWitness/screen.zip /localstorage/downloads/
$ scp -P 22 username@127.0.0.1:/EyeWitness/screen.zip /localstorage/downloads/
$ scp  -I privatekey.pem username@127.0.0.1:/EyeWitness/ /localstorage/downloads/

-P is what you can use to specify the port your ssh is running on you don’t need to use -P if your ssh is using the default port which is 22

username@127.0.0.1 is your VPS server e.g username@167.90.95.0 it can be a domain name also, e.g username@example.com

/EyeWitness/screen.zip is the path to the images I want to download from my Ubuntu VPS

and /localstorage/downloads/ is the path on my system storage am downloading the files too.

Upload Files From Local To Remote Servers Using SCP

upload files to remote server via ssh scp

$ scp /localstorage/downloads/screen.zip username@127.0.0.1:/EyeWitness/

If your SSH runs on a different port, you can use the -P to indicate your port, and if your Remote Server uses a private key, you can use -I for user authentication, this is applicable to AWS users.

$ scp -I private_key.pem /localstorage/downloads/screen.zip username@127.0.0.1:/EyeWitness/

So SCP is a secure copy tool which you can use to download and store files in a remote server via SSH.

The mistakes I made mention earlier was this, I was running the above command while I was still in my VPS environment, guess you all be laughing at me right now, well it’s normal, 😂 at myself when I noticed too.

So I exit the Ubuntu VPS and ran that command again, and got the file to my Local System Storage folder, and I viewed those images one by one, but I found nothing useful with those screenshots eventually.

But at least I did learn something new, messed with the Ubuntu VPS.

If you ever viewed image via ssh on UNIX(Any Linux Terminal) VPS before, feel free to comment the procedures that what worked for you, so I don’t get to download images files back to my System all time

Thank you and stay safe.

LEAVE A REPLY

Please enter your comment!
Please enter your name here