Hi: I'm trying to transfer files through sftp from unix to Linux. When I run my script manually it works fine but it shows error while I configure it in the crontab. Can anyone tell me please what's wrong with it? Thanks in advance!
The only reason that one can think off is both the process are using a different key files. If you are able to perform the operations manually but not via crontan does mean the users running the process are different. So when they are using the public key, the manual one is authenticated but the cron one may not be authenticated on the server.
I think you're correct. There are two users one is admin and the other is mrg. I've added the mgr's key to the ftp server because id_rsa.pub was found under it and not under admin. But I had to configure crontab with admin because mrg doesn't have write privilege there. Now, if I create a id_rsa.pub under admin user and configure it in the ftp server, will it work? Anything else need to be done? Please let me know!