Use tmate.io

This commit is contained in:
Nicolas Viennot 2013-06-11 13:30:25 -04:00
parent 6988b99fb4
commit f89b98e1c3
2 changed files with 5 additions and 2 deletions

View File

@ -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...");

View File

@ -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;