LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   ftp & wget login not working (https://www.linuxquestions.org/questions/linux-software-2/ftp-and-wget-login-not-working-288582/)

vous 02-10-2005 12:59 PM

ftp & wget login not working
 
Hello All,

I'm trying to recursively download a buch of files from a site, and thus I have to use wget.

I'm trying to login wget ftp://servername but I then get booted out because I didn't include the username / password. How do I include the username password in ONE string using both wget and ftp?

Any thoughts?

secesh 02-10-2005 01:24 PM

wget:
Quote:

--http-user=user
--http-passwd=password
Specify the username user and password password on an
HTTP server. According to the type of the challenge,
Wget will encode them using either the "basic" (inse_
cure) or the "digest" authentication scheme.

Another way to specify username and password is in the
URL itself. Either method reveals your password to
anyone who bothers to run "ps". To prevent the pass_
words from being seen, store them in .wgetrc or
.netrc, and make sure to protect those files from
other users with "chmod". If the passwords are really
important, do not leave them lying in those files
either---edit the files and delete them after Wget has
started the download.
ftp:
Quote:

user user-name [password] [account]
Identify yourself to the remote FTP server. If the password
is not specified and the server requires it, ftp will prompt
the user for it (after disabling local echo). If an account
field is not specified, and the FTP server requires it, the
user will be prompted for it. If an account field is speci_
fied, an account command will be relayed to the remote server
after the login sequence is completed if the remote server
did not require it for logging in. Unless ftp is invoked
with ``auto-login'' disabled, this process is done automati_
cally on initial connection to the FTP server.

vous 02-10-2005 01:58 PM

It still says I'm logging in as anonymous

wget -r user administrator ftp://XXXXX

Any other thoughts?

Has anyone ever tested this really; anybody have the whole string that needs to be used?

vous 02-10-2005 02:05 PM

Hello secesh, from that man you posted...

would you know how to disable the local echo?

That is actually the problem, that he doesn't prompt me for the password and just refuses the connection...

vous 02-10-2005 02:10 PM

This is the actual string I use:

wget -r ftp://administrator@XXXXX
...
Logging in as administrator ...
Login incorrect.
unlink: No such file or directory

*** At this stage is where I would expect a prompt from the server so I could type in my password, but that's what not happening...

Any thoughts?

vous 02-10-2005 02:22 PM

Got it:

"wget -r ftp://username:password@SERVERNAME/directory"

Hope it helps someody out!


All times are GMT -5. The time now is 09:54 PM.