---
name: "ssh_error"
section: "3"
platform: "linux"
package: "libssh-2-doc"
version: "0.2+svn20070321-4"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/ssh_error"
---

# ssh\_error(3)

error handling

## NAME

Ssh\_error - error handling

### Functions

char \* **ssh\_get\_error** (void \*error)\
 *retrieve an error text message*  int **ssh\_get\_error\_code** (void \*error)\
 *retrieve the error code from the last error*

## Detailed Description

error handling

## Function Documentation

### char\* ssh\_get\_error (void \* error)

retrieve an error text message

**Parameters:**

*error* the ssh session pointer

**Returns:**

a static string describing the error

### int ssh\_get\_error\_code (void \* error)

retrieve the error code from the last error

**Parameters:**

*error* the ssh session pointer

**Returns:**

SSH\_NO\_ERROR no error occured\
\
  SSH\_REQUEST\_DENIED The last request was denied but situation is recoverable\
\
  SSH\_FATAL A fatal error occured. this could be an unexpected disconnection\
\
  Other error codes are internal but can be considered same than SSH\_FATAL
