I cannot believe I am stuck on this. I have an application that needs to retain the OS date modified on files being transferred, instead of the file transfer date (which is the way ksc_copy_server_server) performs. When we transfer a file with ksc_copy_server_server it uses VCP, but it does not use the -preserve switch to retain the file attributes. So it uses the current date & time. If I try to manually run "ksc_simple_respond "vcp -q -preserve -accepthostkeys -pw [DEST_ENV.SERVER_PASSWORD] "[P.P_FILENAME]" [DEST_ENV.SERVER_USERNAME]@[DEST_ENV.SERVER_NAME]:[P.P_FILENAME]" " " it echo's the password in the execution log. I cannot get it to suppress the password.
If I try "ksc_simple_respond "scp -pv "[P.P_FILENAME]" [DEST_ENV.SERVER_USERNAME]@[DEST_ENV.SERVER_NAME]:." -hide "assword:" "[DEST_ENV.SERVER_PASSWORD]" if fails with "Inappropriate ioctl for device " I am copying from a windows server to a Sun server 5.10.
Has anyone run into this? If I had a way to pass the -preserve switch with the ksc_copy_server_server, that would work. However, I dont believe I can do that, even if I copy it into a new sc_ command. Any ideas would be appreciated.
We use the expect command to execute scp when the server is not configured as an environment. The -p parameter could easily be specified this way to preserve the file creation and modification dates. If the password is specified on the command line call to the expect script, it is masked out in the log.