mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Merge 568aa9295f into ac919516f4
This commit is contained in:
commit
883d1659a1
1 changed files with 8 additions and 1 deletions
|
|
@ -271,7 +271,6 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
|
|||
ssh_set_blocking(session, 0);
|
||||
ssh_options_set(session, SSH_OPTIONS_HOST, client->server_ip);
|
||||
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
||||
ssh_options_set(session, SSH_OPTIONS_PORT, &port);
|
||||
ssh_options_set(session, SSH_OPTIONS_USER, "tmate");
|
||||
ssh_options_set(session, SSH_OPTIONS_COMPRESSION, "yes");
|
||||
|
||||
|
|
@ -289,6 +288,14 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
|
|||
free(identity);
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh 0.9 calls parse_config if it hasn't been parsed
|
||||
* when doing a ssh_connect overwriting the port.
|
||||
* So this overwrites port with our tmate-server-port config.
|
||||
*/
|
||||
ssh_options_parse_config(session, NULL);
|
||||
ssh_options_set(session, SSH_OPTIONS_PORT, &port);
|
||||
|
||||
client->state = SSH_CONNECT;
|
||||
}
|
||||
// fall through
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue