using 'ftp' to log into a password protected ftp

Y

yawnmoth

I'd like to periodically backup the content of a certain computer on a
periodic basis, via password protected ftp, and am having some
difficulty doing so. I'd like to use a batch file and make the
schedular in windows run it once a week or something, but the ftp part
kinda has me stuck.

I can place "ftp domain.tld" in the batch file to log into the ftp, but
how do I log in and how do I download from it?

I thought maybe creating a text file ftp.txt:

username
password

....and then doing "ftp domain.tld < ftp.txt" might do it but it doesn't
seem to. Any ideas as to why it doesn't?

Also, mget *.* only seems to work for the current directory and
requires a confirmation each time. Is there a way to make it work
recursively and not ask for a confirmation each time?

Finally, is there maybe a better - free - command line ftp client
that'd better suite my needs? Even if there were, I still wouldn't
mind answers to my other two questions...
 
3

3c273

Have you tried something like this:

-----ftp bat file-----
ftp -s:c:\pathto\myscript.txt
----/ftp bat file-----

-----ftp script-----
open ftp.myftpsite.com
usernamegoeshere
passwordgoeshere
commandsgohere
andhere
andhere
----/ftp script-----

I have a batch file that updates A/V signatures that works like this.
Louis
 
D

David E. Ross

yawnmoth said:
I'd like to periodically backup the content of a certain computer on a
periodic basis, via password protected ftp, and am having some
difficulty doing so. I'd like to use a batch file and make the
schedular in windows run it once a week or something, but the ftp part
kinda has me stuck.

I can place "ftp domain.tld" in the batch file to log into the ftp, but
how do I log in and how do I download from it?

I thought maybe creating a text file ftp.txt:

username
password

...and then doing "ftp domain.tld < ftp.txt" might do it but it doesn't
seem to. Any ideas as to why it doesn't?

Also, mget *.* only seems to work for the current directory and
requires a confirmation each time. Is there a way to make it work
recursively and not ask for a confirmation each time?

Finally, is there maybe a better - free - command line ftp client
that'd better suite my needs? Even if there were, I still wouldn't
mind answers to my other two questions...

If you want the security of a password-protected FTP site, why would you
risk that security by exposing the password in a script?

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
 
Y

yawnmoth

David said:
yawnmoth wrote:
<snip>
If you want the security of a password-protected FTP site, why would you
risk that security by exposing the password in a script?
What do you propose? That I not do automated backups? Or that I
somehow encrypt the FTP password?
 
D

David E. Ross

yawnmoth said:
What do you propose? That I not do automated backups? Or that I
somehow encrypt the FTP password?

Automate the backups to your local system. Then, manually transfer the
backed-up files.

Automating the entire process -- including the use of a server -- is
only secure when you are entirely within a secure network.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
 
Y

yawnmoth

David said:
Automate the backups to your local system. Then, manually transfer the
backed-up files.

Automating the entire process -- including the use of a server -- is
only secure when you are entirely within a secure network.
Since I'm not using SFTP or anything like that, the passwords are going
to be transmitted in clear text regardless of whether or not I typed
them in manually (and in SFTP, they'd be encrypted, regardless). I
don't see what difference automation would make?
 
D

David E. Ross

yawnmoth said:
Since I'm not using SFTP or anything like that, the passwords are going
to be transmitted in clear text regardless of whether or not I typed
them in manually (and in SFTP, they'd be encrypted, regardless). I
don't see what difference automation would make?

During the transient event of transmitting your password, the
opportunity to grab your password is not as great as having it in static
form on your computer. No, it's not safe sending it in clear during an
FTP session; but having it in the clear on your computer is even less
safe. The issue is relative risk, not absolute risk.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top