Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Networking (https://www.askmehelpdesk.com/forumdisplay.php?f=76)
-   -   FTP Commands (https://www.askmehelpdesk.com/showthread.php?t=1079)

  • Jan 29, 2004, 07:54 AM
    jafo
    FTP Commands
    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'??
  • Feb 29, 2004, 11:10 AM
    LTheobald
    FTP Commands
    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.

    Code:

    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.
  • Feb 29, 2004, 06:03 PM
    psi42
    FTP Commands
    Wget should do it for you. I think there is probably a DOS port somewhere...


    Anyway, this is from the *nix manpage

    Code:

          --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
  • Mar 1, 2004, 10:49 AM
    LTheobald
    FTP Commands
    Silly Lee. Remember not everyone uses Windows *slaps himself on head* :)
  • Mar 1, 2004, 06:42 PM
    psi42
    Re: FTP Commands
    Quote:

    Silly Lee. Remember not everyone uses Windows *slaps himself on head* :)

    :)

  • All times are GMT -7. The time now is 09:39 PM.