The copy command fails because cron is not a regular shell. I'm on my phone but the SCP/SSH man pages explain how to provide a config directory/key file option to the command
Same result:
Permission denied (publickey,password).
Couldn't read packet: Connection reset by peer
---------- Post updated at 01:18 PM ---------- Previous update was at 12:57 PM ----------
Well, I can use succesfully the REXEC command from crontab, providing USERNAME and PASSWORD.
Now I need to tranfer the file, I tried some methods:
SFTP: Doesn't work from crontab
SCP (OpenSSH): Doesn't work since the destination server is HP OpenVMS and for some reason it can't accept the SCP protocol
Simple FTP: Does't work, since I receive the following error message
Connected to 10.99.1.2.
220 FTP Server (Version 5.6) Ready.
502 AUTH is unimplemented.
502 AUTH is unimplemented.
KERBEROS_V4 rejected as an authentication type
At this point, Is there any other way to copy this file to remote OpenVMS server?
Well, thanks all for hints,
I resolved the issue using NCFTP (ncftp(1) manual page)
It also allow me to setup a timeout when one of the destination server is down (i.e. for maintenance). This avoid the script hangs awaiting for long timeout: