View Full Version : FTP Commands
jafo
Jan 29, 2004, 07:54 AM
Does anyone know the proper syntax to make an FTP connectiion with the user name and password all in the same ftp command line.
ftp www.domain.com 'username' 'password'??
LTheobald
Feb 29, 2004, 11:10 AM
To put it simply - you can't! The DOS command FTP doesn't accept the username & password as parameters, just the host name. See below for the full syntax.
FTP [-v] [-d] [-i] [-n] [-g] [-s:filename] [-a] [-w:windowsize] [-A] [host]
-v
Suppresses display of remote server responses.
-n
Suppresses auto-login upon initial connection.
-i
Turns off interactive prompting during multiple file transfers.
-d
Enables debugging.
-g
Disables filename globbing (see GLOB command).
-s:filename
Specifies a text file containing FTP commands; the commands will automatically run after FTP starts.
-a
Use any local interface when binding data connection.
-A
login as anonymous.
-w:buffersize
Overrides the default transfer buffer size of 4096.
host
Specifies the host name or IP address of the remote host to connect to.
But as you can see - no password/username parameters. I guess there may be other DOS based FTP clients that would let you, but I don't know of any. Try looking on the net.
psi42
Feb 29, 2004, 06:03 PM
Wget should do it for you. I think there is probably a DOS port somewhere...
Anyway, this is from the *nix manpage
--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.
~psi42
LTheobald
Mar 1, 2004, 10:49 AM
Silly Lee. Remember not everyone uses Windows *slaps himself on head* :)
psi42
Mar 1, 2004, 06:42 PM
Silly Lee. Remember not everyone uses Windows *slaps himself on head* :)
:)