Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hi so i was doing some research in the library so i could use some pictures later on my Desktop computer in my room. I have space on my Lab account which i usually SSH into, and i was wondering if URL's can be directly transferred over to a remote machine and saved on the hard disk.

I was thinking something like this:

scp http://click.si.edu/images/truncatedurl.jpg /home3/etc.../filename.jpg

is this possible?

Thanks in advance.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You could do something like this. Basically you grab the contents and pipe it into a remote file using ssh. This will work best if you have key-based authentication setup, so you don't have to provide your credentials during the copy process.

curl "http://click.si.edu/images/truncatedurl.jpg" | \
  ssh remotehost 'cat > /home3/etc.../filename.jpg'
share|improve this answer
    
lol i got reported for trying to install curl on the lab machines. Can i install it on my machine and have it work? –  AlanTuring Oct 2 '12 at 21:08
    
what about wget click.si.edu/images/truncatedurl.jpg -O file.jpg && scp file.jpg login@server:/home3/etc.../filename.jpg –  AlanTuring Oct 2 '12 at 21:26
2  
If you have remote access to your home machine why don't you simply ssh to the remote machine and run wget/curl from there? –  Zoredache Oct 2 '12 at 21:33
    
i....didn't think of that...lol thanks –  AlanTuring Oct 2 '12 at 21:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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