Secure Shell (SSH, SCP, and SFTP) Return Codes in UNIX
Technical Note 2487
Last Reviewed 05-Feb-2010
Applies To
Reflection for Secure IT UNIX Client version 7.0 or higher
Summary

This technical note lists the error or exit codes for Reflection command line utilities SSH, SCP, and SFTP in UNIX.

For a list of SSH, SCP, and SFTP return codes in Windows, see Technical Note 2285.

Error Codes

The purpose of an error code is to describe the error occurring in a program; it may display on the command line or in a log or a trace file.

SSH Error Codes

0
Success
1
Generic error
2
Remote host connection failure

SCP/SFTP Error Codes

The numbering scheme of the SCP/SFTP error codes was derived by adding 64 to the RFC4253 error code, for example, 64 + 1 = 65.

Source: RFC4253 error code + 64

65
Host not allowed to connect
66
Protocol error
67
Key exchange failed
68
Host authentication failed
69
MAC error
70
Compression error (not used in SSH2)
71
Service not available
72
Protocol version not supported
73
Host key not verifiable
74
Connection lost
75
Disconnected by application
76
Too many connections
77
Cancelled by user
78
No more auth methods available
79
Illegal user name

Exit Codes

You can display an exit code by typing echo $? after executing an SSH, SCP, or SFTP command.

Attachmate-defined SCP/SFTP Exit Codes

0
Success
1
Undetermined error in file copy
3
Destination is not directory, but it should be
4
Connecting to host failed
5
Connection lost for some reason
6
File does not exist
7
No permission to access file
8
Undetermined error from sshfilexfer
9
File transfer protocol mismatch
255
Error occurred in SSH
Related Technical Notes
2285 Secure Shell (SSH, SCP, and SFTP) Return Codes in Windows

Did this technical note answer your question?

           



Need further help? For technical support, please contact Support.