Download password protected file over shell

Therefore we use wget:

If you let -O param out the output will be stored under its original name.

Send a file header in controller (file download)

To return a downloadable file in a controller action, you have to send a file header in controller like that:


Download or upload a file over SSH

You can add a port with the -P param You can do it recursive with the -r param HINT: If you got an “Too many authentication failures for X” errror, you can add the param -o PubkeyAuthentication=no . If you couldn’t  authenticate via ssh key,  you can use sshpass to authenticate via password: