Automate [ls]ftp

Heyas

Seen some of the ftp posts here and knowing i'll be writing a script using ftp soon, so i thought i'd write a script to automate, or at least simplify some basic tasks with it.

I'm currently stuck at handling active/passiv modes.
Neither lftp nor sftp seem to support them by arguments, lftp does, using ~/.lftp.

So my question is:
Does sftp support to be forced using active or passive mode?
If it does, i must oversee this in the manpage :frowning:
I do acknowledge its using ssh, but i still hope there is a 'toggle' for active/passive mode.

Is ftp the only command actualy allowing a toggle to use active or passive mode?
Might wget be a better option to be included in this script handler?

Thank you in advance
Regards
sea

Note:
I found these posts, which might be resourcefull during this task for other things not mentioned above.
Just posted them here, so i dont have to use the search function again.

sftp is not ftp at all.

The command line 'ftp' client can probably select passive mode, if not by -p, then by a command during the session.

1 Like

Yes i'm aware of the ftp client itself, but me writing a handler for 'ftp' tasks.
And given its name, sftp should be supposed to belong there...

So me crazy loco gringo added sftp and lftp to the list of possible ftp commands (aside of the obvious ftp). :wink:

Guess i can remove the sftp handling then.

Thank you.

It acts like FTP, in that it has a similar interface, but uses scp's protocol.

1 Like