
GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. Some of the website and most of ftp site on internet require username and password in order to access the pages. This post will describe how to use wget with basic authentication.The following example of wget commands should allow you to access pages on a website that requires a username and password:
wget http://username:myPassword@www.ehowstuff.local/example/file.txt
wget --http-user=username --http-password=myPassword http://www.ehowstuff.local/example/file.txt
wget --user=username --password='myPassword' ftp://www.ehowstuff.local/example/file.txt
wget -r --user=username --password='myPassword' ftp://www.ehowstuff.local/example/