SSH exit codes

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

ssh from OpenSSH exits with the exit status of the remote command or with 255 if an error occurred.


ssh2 on z/OS uses these exit codes:

0 Operation was successful
1 Generic error, usually because invalid command line options or malformed configuration
2 Connection failed
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