16 #include <libssh/libssh.h> 21 #define STDERR_FILENO 2 25 #define STDOUT_FILENO 1 28 #define SSH_BASE_OPTIONS \ 29 { "remote-host", required_argument, NULL, OPT_REMOTE_HOST}, \ 30 { "remote-port", required_argument, NULL, OPT_REMOTE_PORT}, \ 31 { "remote-username", required_argument, NULL, OPT_REMOTE_USERNAME}, \ 32 { "remote-password", required_argument, NULL, OPT_REMOTE_PASSWORD}, \ 33 { "remote-interface", required_argument, NULL, OPT_REMOTE_INTERFACE}, \ 34 { "remote-filter", required_argument, NULL, OPT_REMOTE_FILTER}, \ 35 { "remote-count", required_argument, NULL, OPT_REMOTE_COUNT}, \ 36 { "sshkey", required_argument, NULL, OPT_SSHKEY}, \ 37 { "sshkey-passphrase", required_argument, NULL, OPT_SSHKEY_PASSPHRASE} 40 ssh_session create_ssh_connection(
const char* hostname,
const guint16 port,
const char* username,
41 const char* password,
const char* sshkey_path,
const char* sshkey_passphrase,
char** err_info);
44 int ssh_channel_printf(ssh_channel channel,
const char* fmt, ...);
47 void ssh_cleanup(ssh_session* sshs, ssh_channel* channel);