List of Linux scp return / status codes

Can someone point me to a link or provide a list of the
status / return codes values & what they mean for
scp (running in RHES 4.x).

Eg: what's the status code if
- the source file is not present
- the permission of file/directory does not allow me
    to read  &   to write
- if the firewall in between blocks scp
- if the link / connectivity is down (but firewall permits)
- the ssh public/private keys have a problem
- the userid used to do scp is invalid
- etc etc

As example, I'm looking for something like the following but
the following is for ncftpget utility :

=============== fr EE thread id 34077378 ================

These are the errorlevel values returned by ncftpget:

    ncftpget returns the following exit values:

       0. Success.
       1. Could not connect to remote host.
       2. Could not connect to remote host - timed out.
       3. Transfer failed.
       4. Transfer failed - timed out.
       5. Directory change failed.
       6. Directory change failed - timed out.
       7. Malformed URL.
       8. Usage error.
       9. Error in login configuration file.
      10. Library initialization failed.
      11. Session initialization failed.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


here it is:

SCP Return Codes
0      Operation was successful
1      General error in file copy
2      Destination is not directory, but it should be
3      Maximum symlink level exceeded
4      Connecting to host failed.
5      Connection broken
6      File does not exist
7      No permission to access file.
8      General error in sftp protocol
9      File transfer protocol mismatch
10      No file matches a given criteria
65      Host not allowed to connect
66      General error in ssh protocol
67      Key exchange failed
68      Reserved
69      MAC error
70      Compression error
71      Service not available
72      Protocol version not supported
73      Host key not verifiable
74      Connection failed
75      Disconnected by application
76      Too many connections
77      Authentication cancelled by user
78      No more authentication methods available
79      Invalid user name

This is for WinSCP:

And here is PuTTY:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sunhuxAuthor Commented:
excellent, thanks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSH / Telnet Software

From novice to tech pro — start learning today.