{DKIM Fail} Re: sftp fails when run from cron
James Moe
jimoe at sohnen-moe.com
Fri Sep 14 17:01:23 AEST 2018
On 09/13/2018 07:54 PM, Darren Tucker wrote:
> I'd guess that the reason it doesn't work is that the key is encrypted
> and neither the agent nor a tty to ask for the decryption passphrase
> is available. Try repeating your command line test after unsetting
> SSH_AUTH_SOCK
>
Okay. That reproduced the issue.
Is there a recommended way to provide the decryption passphrase?
$ export SSH_AUTH_SOCK=""
$ bin/sftp-sma-download
command: /usr/bin/sftp -P 1022 -p -o GSSAPIAuthentication=no -i
/home/xxx/.ssh/jumpline -b /home/xxx/bin/sftp-sma-download-batch
yyy at sohnen-moe.com
yyy at sohnen-moe.com: Permission denied (publickey).
Connection closed
SFTP did not go well [255]
$ export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"
$ bin/sftp-sma-download
command: /usr/bin/sftp -P 1022 -p -o GSSAPIAuthentication=no -i
/home/xxx/.ssh/jumpline -b /home/xxx/bin/sftp-sma-download-batch
yyy at sohnen-moe.com
sftp> #
sftp> cd /home/YYY/sma/db
etc...
--
James Moe
moe dot james at sohnen-moe dot com
520.743.3936
Think.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20180914/8ba9f030/attachment.asc>
More information about the openssh-unix-dev
mailing list