diff options
Diffstat (limited to 'sshconnect.h')
-rw-r--r-- | sshconnect.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sshconnect.h b/sshconnect.h index 720004675..4e16f2d85 100644 --- a/sshconnect.h +++ b/sshconnect.h | |||
@@ -23,6 +23,34 @@ | |||
23 | */ | 23 | */ |
24 | #ifndef SSHCONNECT_H | 24 | #ifndef SSHCONNECT_H |
25 | #define SSHCONNECT_H | 25 | #define SSHCONNECT_H |
26 | /* | ||
27 | * Opens a TCP/IP connection to the remote server on the given host. If port | ||
28 | * is 0, the default port will be used. If anonymous is zero, a privileged | ||
29 | * port will be allocated to make the connection. This requires super-user | ||
30 | * privileges if anonymous is false. Connection_attempts specifies the | ||
31 | * maximum number of tries, one per second. This returns true on success, | ||
32 | * and zero on failure. If the connection is successful, this calls | ||
33 | * packet_set_connection for the connection. | ||
34 | */ | ||
35 | int | ||
36 | ssh_connect(const char *host, struct sockaddr_storage * hostaddr, | ||
37 | u_short port, int connection_attempts, | ||
38 | int anonymous, uid_t original_real_uid, | ||
39 | const char *proxy_command); | ||
40 | |||
41 | /* | ||
42 | * Starts a dialog with the server, and authenticates the current user on the | ||
43 | * server. This does not need any extra privileges. The basic connection to | ||
44 | * the server must already have been established before this is called. If | ||
45 | * login fails, this function prints an error and never returns. This | ||
46 | * initializes the random state, and leaves it initialized (it will also have | ||
47 | * references from the packet module). | ||
48 | */ | ||
49 | |||
50 | void | ||
51 | ssh_login(int host_key_valid, RSA * host_key, const char *host, | ||
52 | struct sockaddr * hostaddr, uid_t original_real_uid); | ||
53 | |||
26 | 54 | ||
27 | void | 55 | void |
28 | check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, | 56 | check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, |