Wget:How To Specify Username And Password For FTP/HTTP File Download
If you want to download files over FTP or HTTP protocol which require username and password in linux operating system, how to use wget command with username and password to download files? In this post we’ll see how to use wget when you need provide username and password to download a file:
What Is Wget?
GNU Wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. Wget can follow links in HTML, XHTML, and CSS pages, to create local versions of remote web sites, fully recreating the directory structure of the original site.
How To Use Wget without username/password
Mostly, you use wget to download files, just issue “wget” command pass the download path or download link directly. see below:
#wget http://os.ghalkes.nl/dist/tilde-0.2.0.tar.bz2
How To Use Wget with username and password
Specify the username user and password password for both FTP and HTTP file retrieval. 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.
Issue the following wget command:
wget --user=<username> --password="<password>" http://os.ghalkes.nl/dist/tilde-0.2.0.tar.bz2
Options:
–user: you need to provide a valid user to access the ftp server or http server
–password: specify the password of the above provided user.
Done…..