How do I use a password that contains special characters with 'wget'?

4

1

My FTP password has a colon; when I do a wget with my user name and password, it keeps complaining that a "bad port number" is being used. Is there a solution? I tried the : trick but did not help.

thevikas

Posted 2010-09-01T07:32:33.343

Reputation: 331

Answers

8

Use --password=password or --ftp-password.

Sjoerd

Posted 2010-09-01T07:32:33.343

Reputation: 1 131

3

You need to encode special characters in your password using URL encoding. For example, if the user is "user1" and the password "12#j" the resulting URL would look as follows:

user1:12%23j@myserver:port

Note, that I replaced the # character with its URL-code %23 .

Bernhard Kausler

Posted 2010-09-01T07:32:33.343

Reputation: 353

1# replacement is exactly what i need – vladkras – 2014-05-28T12:08:26.393