Functions | |
| int | pubkey_get_hash (SSH_SESSION *session, unsigned char hash[MD5_DIGEST_LEN]) |
| int | ssh_connect (SSH_SESSION *session) |
| connect to the ssh server | |
| void | ssh_disconnect (SSH_SESSION *session) |
| disconnect from a session (client or server) | |
| const char * | ssh_get_disconnect_message (SSH_SESSION *session) |
| get the disconnect message from the server | |
| int | ssh_get_fd (SSH_SESSION *session) |
| recover the fd of connection | |
| char * | ssh_get_issue_banner (SSH_SESSION *session) |
| get the issue banner from the server | |
| int | ssh_get_pubkey_hash (SSH_SESSION *session, unsigned char hash[MD5_DIGEST_LEN]) |
| get the md5 hash of the server public key | |
| int | ssh_get_status (SSH_SESSION *session) |
| get session status | |
| int | ssh_get_version (SSH_SESSION *session) |
| get the protocol version of the session | |
| int | ssh_handle_packets (SSH_SESSION *session) |
| int | ssh_is_server_known (SSH_SESSION *session) |
| test if the server is known | |
| SSH_SESSION * | ssh_new () |
| creates a new ssh session | |
| int | ssh_select (CHANNEL **channels, CHANNEL **outchannels, int maxfd, fd_set *readfds, struct timeval *timeout) |
| wrapper for the select syscall | |
| void | ssh_set_blocking (SSH_SESSION *session, int blocking) |
| set the session in blocking/nonblocking mode | |
| void | ssh_set_fd_except (SSH_SESSION *session) |
| say the session it has an exception to catch on the file descriptor | |
| void | ssh_set_fd_toread (SSH_SESSION *session) |
| say to the session it has data to read on the file descriptor without blocking | |
| void | ssh_set_fd_towrite (SSH_SESSION *session) |
| say the session it may write to the file descriptor without blocking | |
| void | ssh_set_options (SSH_SESSION *session, SSH_OPTIONS *options) |
| set the options for the current session | |
| void | ssh_silent_disconnect (SSH_SESSION *session) |
| disconnect impolitely from remote host | |
| int | ssh_write_knownhost (SSH_SESSION *session) |
| write the current server as known in the known hosts file | |
*
*
| int pubkey_get_hash | ( | SSH_SESSION * | session, | |
| unsigned char | hash[MD5_DIGEST_LEN] | |||
| ) |
| int ssh_connect | ( | SSH_SESSION * | session | ) |
connect to the ssh server
| session | ssh session |
| void ssh_disconnect | ( | SSH_SESSION * | session | ) |
disconnect from a session (client or server)
| session | ssh session |
| const char* ssh_get_disconnect_message | ( | SSH_SESSION * | session | ) |
get the disconnect message from the server
| session | ssh session |
| int ssh_get_fd | ( | SSH_SESSION * | session | ) |
recover the fd of connection
In case you'd need the file descriptor of the connection to the server/client
| session | ssh session |
| char* ssh_get_issue_banner | ( | SSH_SESSION * | session | ) |
get the issue banner from the server
this is the banner showing a disclaimer to users who log in, typicaly their right or the fact that they will be monitored
| session | ssh session |
| int ssh_get_pubkey_hash | ( | SSH_SESSION * | session, | |
| unsigned char | hash[MD5_DIGEST_LEN] | |||
| ) |
get the md5 hash of the server public key
| session | ssh session | |
| hash | destination for the md5 hash |
| int ssh_get_status | ( | SSH_SESSION * | session | ) |
get session status
| session | ssh session |
| int ssh_get_version | ( | SSH_SESSION * | session | ) |
get the protocol version of the session
| session | ssh session |
| int ssh_handle_packets | ( | SSH_SESSION * | session | ) |
| int ssh_is_server_known | ( | SSH_SESSION * | session | ) |
test if the server is known
checks the user's known host file for a previous connection to the current server.
| session | ssh session |
| SSH_SESSION* ssh_new | ( | ) |
creates a new ssh session
| int ssh_select | ( | CHANNEL ** | channels, | |
| CHANNEL ** | outchannels, | |||
| int | maxfd, | |||
| fd_set * | readfds, | |||
| struct timeval * | timeout | |||
| ) |
wrapper for the select syscall
This functions acts more or less like the select(2) syscall.
There is no support for writing or exceptions.
| channels | arrays of channels pointers finished by an NULL. It is never rewritten/ | |
| outchannels | arrays of same size that "channels", it hasn't to be initialized | |
| maxfd | maximum +1 file descriptor from readfds | |
| readfds | an fd_set of file descriptors to be select'ed for reading | |
| timeout | a timeout for the select |
| void ssh_set_blocking | ( | SSH_SESSION * | session, | |
| int | blocking | |||
| ) |
set the session in blocking/nonblocking mode
| session | ssh session | |
| blocking | zero for nonblocking mode |
| void ssh_set_fd_except | ( | SSH_SESSION * | session | ) |
say the session it has an exception to catch on the file descriptor
| session | ssh session |
| void ssh_set_fd_toread | ( | SSH_SESSION * | session | ) |
say to the session it has data to read on the file descriptor without blocking
| session | ssh session |
| void ssh_set_fd_towrite | ( | SSH_SESSION * | session | ) |
say the session it may write to the file descriptor without blocking
| session | ssh session |
| void ssh_set_options | ( | SSH_SESSION * | session, | |
| SSH_OPTIONS * | options | |||
| ) |
set the options for the current session
| session | ssh session | |
| options | options structure |
| void ssh_silent_disconnect | ( | SSH_SESSION * | session | ) |
disconnect impolitely from remote host
| session | current ssh session |
| int ssh_write_knownhost | ( | SSH_SESSION * | session | ) |
write the current server as known in the known hosts file
You generaly uses it when ssh_is_server_known() answered SSH_SERVER_NOT_KNOWN
| session | ssh session |
1.5.2-20070719