mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-28 08:14:27 +01:00
Use tmate.io
This commit is contained in:
parent
6988b99fb4
commit
f89b98e1c3
@ -72,7 +72,7 @@ static void consume_channel(struct tmate_ssh_client *client)
|
|||||||
static void on_session_event(struct tmate_ssh_client *client)
|
static void on_session_event(struct tmate_ssh_client *client)
|
||||||
{
|
{
|
||||||
int verbosity = SSH_LOG_RARE;
|
int verbosity = SSH_LOG_RARE;
|
||||||
int port = 2200;
|
int port = TMATE_PORT;
|
||||||
|
|
||||||
ssh_session session = client->session;
|
ssh_session session = client->session;
|
||||||
ssh_channel channel = client->channel;
|
ssh_channel channel = client->channel;
|
||||||
@ -97,7 +97,7 @@ static void on_session_event(struct tmate_ssh_client *client)
|
|||||||
ssh_options_set(session, SSH_OPTIONS_HOST, "localhost");
|
ssh_options_set(session, SSH_OPTIONS_HOST, "localhost");
|
||||||
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
ssh_options_set(session, SSH_OPTIONS_LOG_VERBOSITY, &verbosity);
|
||||||
ssh_options_set(session, SSH_OPTIONS_PORT, &port);
|
ssh_options_set(session, SSH_OPTIONS_PORT, &port);
|
||||||
ssh_options_set(session, SSH_OPTIONS_USER, "tmate");
|
ssh_options_set(session, SSH_OPTIONS_USER, TMATE_HOST);
|
||||||
ssh_options_set(session, SSH_OPTIONS_COMPRESSION, "yes");
|
ssh_options_set(session, SSH_OPTIONS_COMPRESSION, "yes");
|
||||||
|
|
||||||
tmate_debug("Connecting...");
|
tmate_debug("Connecting...");
|
||||||
|
3
tmate.h
3
tmate.h
@ -57,6 +57,9 @@ extern void tmate_decoder_commit(struct tmate_decoder *decoder, size_t len);
|
|||||||
|
|
||||||
/* tmate-ssh-client.c */
|
/* tmate-ssh-client.c */
|
||||||
|
|
||||||
|
#define TMATE_HOST "tmate.io"
|
||||||
|
#define TMATE_PORT 22
|
||||||
|
|
||||||
typedef struct ssh_session_struct* ssh_session;
|
typedef struct ssh_session_struct* ssh_session;
|
||||||
typedef struct ssh_channel_struct* ssh_channel;
|
typedef struct ssh_channel_struct* ssh_channel;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user