Hello Greg,

Am 30.04.2025 um 22:23 schrieb Greg Wilburn <gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>:

So this worked fine under my user profile because I have authority to the SFTP Users .ssh directory (/home/biz/.ssh).

If I ran the CL program as another user, it failed
"Warning: Identity file /home/biz/.ssh/id_rsa not accessible: Permission denied.

OpenSSH requires the private key to be readable by the owner only, creating additional obstacles. Solution below…

hostkeys_find_by_key_hostfile: hostkeys_foreach failed for /home/biz/.ssh/known_hosts: Permission denied
Host key verification failed."

I tried CHGPGM PGM(ASTHHOBJ/MySFTPclp) USRPRF(*OWNER) - that didn't help.

Dunno what that should to in this particular case.

I guess I'm back to submitting the CL as the SFTP user? I don't know how else to overcome this.

Yes, please do so, as advised earlier. It also removes the need to give pathnames for files entirely, because they're used implicitly.

The most clean approach seen from SSH is to stay consistent with username and his home directory with all the files below.

(Only loosely related: You can make the whole thing less complex if you can switch from sftp to scp — if the sole thing it should do is copy data.)

(the reason I don't want to submit the job is that it's inside a job stream that deletes the files after sending)

Uhm, remove the delete temporarily?

:wq! PoC


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.