SCP succeeds but no file on other end?
Hey guys,
I have this Unix script scheduled to transfer a certain file to a remote server using SCP. Code:
scp -oIdentityFile=id_file file_to_transfer.csv remote_user@remoteserver.com:/remotedirectory Code:
scp command here The question is, given that the return code of the scp command is checked, is there any way it would fail and my script will not be able to see it? Cheers. |
depends on the errors message the system is checking. if the error command is not run exactly after the scp command then it could be returning a false positive. that is possible. have you manually run the scp command to verify that the file can be transmitted successfully?
working on the assumption that the script is correct, how do you know the receiver is just not foolish and does not know what they are looking at, or that there is not an error on their end? |
Hi lleb,
Thanks for the feedback. The error command comes right after the scp command (please see code above). Quote:
|
all i see is something like Error is used to see if the file sent successfully.
can try scp with "-v" and see whats happening . untill you try sending the file manually and see the logs if the identity file was able to do a successful authentication because i cant see Identityfile as an option with "-O" identity file is given with "-i ID_file" (Though I am not pretty sure about this being the issue) but having a look at man scp may give you an idea. |
Wait, I just noticed that there is actually a CR after the scp command, like this:
Code:
scp command here Cheers. |
Quote:
Cheers. |
Quote:
|
All times are GMT -5. The time now is 11:44 PM. |