Q:

wget and htaccess: username only

I googled how to download images using terminal in ubuntu with wget. I found what I needed, but on the server, protected with .htaccess, there's no password. with 
wget admin@http://server.com/filename.jpg
it returns: No route to hosts. When I set a password and type
wget admin:password@http://server.com/filename.jpg
everything's fine. However I am not allowed to use a password on the server. How to fix it, finding route?

A:

Much easier:
wget --user="username" --password="password" http://xxxx.yy/filename.xxx

A:

Try
wget --user=admin http://server.com/filename.jpg

instead.
Alternatively, 
wget http://admin:@server.com/filename.jpg

may work instead.
Your syntax is actually wrong, as its:
wget http://user:pass@host/file

your username is outside the url, and was being treated as a hostname.

