On Tue, Mar 29, 2022 at 04:20:09PM +0000, Bob Wyatt via IBM Community wrote:
> We need to run unattended sftp several times a day.
> We are running AIX 7200-04-02 with minimal (what is provided with the AIX install) open-source packages.
> OpenSSH and OpenSSL were installed from the 7200-04-02 media (the IBM version of OpenSSH 1.0.2t).
>
> Most of our vendors are not using identifier info ??? all they want are username and password.
> It appears that sftp as supplied does not offer/support password utilization.
SSH keys would be preferred. Make a strong keypair, send them the
public key to assign to your account.
> I've seen suggestions to use expect or sshpass, neither of which is currently installed.
> Both are available from IBM Toolbox.
expect should be installed by default. I just checked a 7.2 server,
and though it's packaged as an RPM, I'm pretty sure it's from the base
OS. We did not install that RPM as there is a strict policy of as few
OSS packages as possible.
You could also look at using a batchfile of commands (sftp -b
filename). You could potentially use a here document in a shell script
too with '-b -'.
------------------------------------------------------------------
Russell Adams
Russell.Adams@AdamsSystems.nlPrincipal Consultant Adams Systems Consultancy
http://adamssystems.nl/