Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Other Programming (https://www.askmehelpdesk.com/forumdisplay.php?f=437)
-   -   Automate batch file to accept username & Password (https://www.askmehelpdesk.com/showthread.php?t=336956)

  • Apr 2, 2009, 07:05 AM
    YogeshS
    Automate batch file to accept username & Password
    Hello experts
    I am conneting to my ftp server through batch file.
    But every time it is asking me for username & password

    So how do I pass the authentification (username & Password) parameters through the batch file itself.

    (I need to automate my batch file , passing the username and password in the batch file itself)so that, user doesn't have to put in the authentication every time.

    Guide
  • Apr 2, 2009, 11:18 PM
    Scleros
    For the Windows command-line FTP client you can do (tested on XP, may need tweaks for other versions):

    Code:

    ftp -s:commandscript.txt myftpserver.mydomain.com
    ... and provide the commands to run in the file commandscript.txt:

    Code:

    MyUsername
    MyPassword
    Binary
    Close
    Quit

    For other clients, see the documentation. Also note that storing passwords in a text file is a security risk. If you have administrative control of the server, using SSH SFTP/SCP is more secure.

    Additional Resources:
    Microsoft Windows Command-Line FTP Command List
    Batch Files: Unattended FTP downloads
    Wikipedia: SSH File Transfer Protocol
    Wikipedia: Secure Copy
    PuTTY: A free telnet/ssh client
    FileZilla: The free FTP solution
    ITeF!x: copssh - OpenSSH for Windows (can also be used for remote access with public/private keys to tunnel a Remote Desktop connection via PuTTY client)

  • All times are GMT -7. The time now is 01:27 PM.