how to use ftp(1) in batch mode

Mario Lobo lobo at bsd.com.br
Fri Aug 31 17:55:23 UTC 2018


2018-08-31 11:01 GMT-03:00 Eugene Grosbein <eugen at grosbein.net>:

> 31.08.2018 20:52, Wojciech Puchar write:
>
> > thank you. it works. actually even without netrc
> >
> > (echo command1;echo command2)|ftp ftp://user:password@server/
>
> You better not develop a habit typing passwords in command line or URLs,
> this is quite insecure.
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>

I believe that using sftp with authorized keys in batch mode is safer. The
batch file would only need to have the actual commands.

The only drawback for this method to be fully non-interactive is that you
have to take out the passphrase from the private key.

-- 
Mario Lobo
http://www.mallavoodoo.com.br
FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!]


More information about the freebsd-hackers mailing list