I'd like to basically pipe a wget
command to a file on a remote server over SSH. How can I do this? I know I could simply ssh
into the server and have it download the file, but I'd much rather use the local machine to download it and send it.
Wget – How to Download a File to a Remote Machine Over SSH
sshwget
Best Answer
So you are logged into a machine
myclient
and havessh
access to another machinemyserver
. You want to download a file over HTTP from a remove serverwww.example.com
tomyclient
but the data needs to be saved onmyserver
. This should do it:Alternatively, you could mount the
myserver
's filesystem over SSH with sshfs. This may be too much hassle for a one-off need, but convenient if you do this sort of thing often.