Wget and htaccess: username only

I googled how to upload images using terminal in ubuntu using wget. I found what I need, but there is no password on the server protected by .htaccess. from

wget admin@http ://server.com/filename.jpg

it returns: there is no host path. When I set a password and type

wget admin: password@http ://server.com/filename.jpg

everything is fine. However, I am not allowed to use the password on the server. How to fix it, find a route?

+6
source share
2 answers

Much simpler:

 wget --user="username" --password="password" http://xxxx.yy/filename.xxx 
+20
source

Try

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

instead.

As an alternative

 wget http://admin:@server.com/filename.jpg 

may work instead.

Your syntax is actually erroneous because of its:

 wget http://user: pass@host /file 

your username is outside the URL and is treated as a host name.

+6
source

Source: https://habr.com/ru/post/905857/


All Articles