Q. How do I use wget ftp / http client tool to download files from password protected web page?
A. wget command supports username and password combo for both FTP and HTTP file retrieval.
Pass following option to wget command:
--user=userName: Your FTP/HTTP username
--password=passWord : Your HTTP/FTP password
These parameters can be overridden using the --ftp-user and --ftp-password options for FTP connections and the --http-user and --http-password options for HTTP connections.
Download a file called foo.pdf from theos.in:
$ wget --user=vivek --password='myPassword' http://theos.in/protected/area/foo.pdf
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 17 comments… read them below or add one }
wow…that was cool!
thats great u saved me
Could this be used for rapidshare?
Didn’t work for me. I am on a windows machine. Not sure if that makes a diffrence.
gnuwin32.sf.net
wget 1.12
–ftp-user=
–ftp-password=
Works Like a charm!!!
tx.
I need to download a file from my server on another machine with wget, using -p password as an argument is not an option since people could simply find my password with a ps command! Do you know anyway I could force wget to ask for my password after typing the command? like when do mysql -u root -p and it will ask you for the root password?
thanks
Works Like a charm!!!
tx. [2]
wget does not work directly if the site redirects to form based login page, i.e. no HTTP 401 returned
Its Working fine, Thx a lots..
As easy at that! This made downloading a large XML file much easier than using a browser which ended up crashing 9 out of 10 times.
Many thanks.
Chris.
I tried the following command which gave a Error Response
The Response is
Resolving cambuild.qalab.cam.novell.com… 164.99.129.35
Connecting to cambuild.qalab.cam.novell.com|164.99.129.35|:80… connected.
HTTP request sent, awaiting response… 403 Forbidden
2012-01-18 10:07:51 ERROR 403: Forbidden.
Have any one faced a similar issue and if yes can you let me know how to come out from this
I have the same problem. Any ideas on how to fix?
Thank you so much, this was exactly what I needed, and it works wonderfully!
Hi Reddy,
You must have got your answer by now, posting info hopeing it would help others
Connecting to cambuild.qalab.cam.novell.com|164.99.129.35|:80… connected.
HTTP request sent, awaiting response… 403 Forbidden
2012-01-18 10:07:51 ERROR 403: Forbidden.
If you see the error above, it show your machine succesfully connected to remote host on port 80, however could not find the page you have requsted for403 Forbidden.
Hope this clarify.
Working Perfectly Thanks a lot
very very useful command for me
Thanks a ton..