I am uploading a file via sftp from one server to another server. Normally i will get exit status 0 to indicate the transfer is success.
But there are some instances where i will get exit status 1.
Why is this so? How do i base on this exit status to know what exactly went wrong?