version 1.40, 1999/11/24 19:53:53 |
version 1.41, 1999/12/01 13:59:15 |
|
|
* Connect to the given ssh server using a proxy command. |
* Connect to the given ssh server using a proxy command. |
*/ |
*/ |
int |
int |
ssh_proxy_connect(const char *host, int port, uid_t original_real_uid, |
ssh_proxy_connect(const char *host, u_short port, uid_t original_real_uid, |
const char *proxy_command) |
const char *proxy_command) |
{ |
{ |
Buffer command; |
Buffer command; |
|
|
char portstring[100]; |
char portstring[100]; |
|
|
/* Convert the port number into a string. */ |
/* Convert the port number into a string. */ |
snprintf(portstring, sizeof portstring, "%d", port); |
snprintf(portstring, sizeof portstring, "%hu", port); |
|
|
/* Build the final command string in the buffer by making the |
/* Build the final command string in the buffer by making the |
appropriate substitutions to the given proxy command. */ |
appropriate substitutions to the given proxy command. */ |
|
|
*/ |
*/ |
int |
int |
ssh_connect(const char *host, struct sockaddr_in * hostaddr, |
ssh_connect(const char *host, struct sockaddr_in * hostaddr, |
int port, int connection_attempts, |
u_short port, int connection_attempts, |
int anonymous, uid_t original_real_uid, |
int anonymous, uid_t original_real_uid, |
const char *proxy_command) |
const char *proxy_command) |
{ |
{ |