Unix, Linux: how to do a proper and secure file transfer in a cronjob

I got advised to do sftp with an empty passphrase. I got that working. Was pretty straight forward. But is there a better way? With a non-empty passphrase? But how to deal with that passphrase?

I do my ordinary SSH handling with an SSH agent, and I feel quite confident with that. But I yet have to find out about best practice of SSH-based “file transfers in the background”.

sftp with an empty passphrase” is what I use for now.

On the target side the account gets a chroot-ed environment through a directive in sshd_config. But the chroot-ed environment gets linked via “mount –bind” into a useful and not so much restricted environment.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.