Skip to content

Commit

Permalink
Merge pull request #1506 from FreeRDP/issue_1505-sshcomp
Browse files Browse the repository at this point in the history
Removed compression option as not compatible with all SSH servers. Fixes #1505
  • Loading branch information
antenore committed Mar 12, 2018
2 parents e3f5bd8 + e95784c commit c9e3a2d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
13 changes: 11 additions & 2 deletions remmina/src/remmina_ssh.c
Expand Up @@ -490,7 +490,8 @@ remmina_ssh_init_session(RemminaSSH *ssh)
ssh->session = ssh_new();
ssh_options_set(ssh->session, SSH_OPTIONS_HOST, ssh->server);
ssh_options_set(ssh->session, SSH_OPTIONS_PORT, &ssh->port);
ssh_options_set(ssh->session, SSH_OPTIONS_COMPRESSION, "yes");
/** @todo add an option to set the compression nad set it to no as the default option */
//ssh_options_set(ssh->session, SSH_OPTIONS_COMPRESSION, "yes");
/* When SSH_OPTIONS_USER is not set, the local user account is used */
if (*ssh->user != 0)
ssh_options_set(ssh->session, SSH_OPTIONS_USER, ssh->user);
Expand Down Expand Up @@ -536,6 +537,12 @@ remmina_ssh_init_session(RemminaSSH *ssh)
}else {
remmina_log_printf("[SSH] SSH_OPTIONS_STRICTHOSTKEYCHECK does not have a valid value: %d\n", ssh->stricthostkeycheck);
}
rc = ssh_options_set(ssh->session, SSH_OPTIONS_COMPRESSION, ssh->compression);
if (rc == 0) {
remmina_log_printf("[SSH] SSH_OPTIONS_COMPRESSION has been set to: %s\n", ssh->compression);
}else {
remmina_log_printf("[SSH] SSH_OPTIONS_COMPRESSION does not have a valid value: %s\n", ssh->compression);
}

ssh_callbacks_init(ssh->callback);
if (remmina_log_running()) {
Expand Down Expand Up @@ -646,6 +653,8 @@ remmina_ssh_init_from_file(RemminaSSH *ssh, RemminaFile *remminafile)
ssh->hostkeytypes = g_strdup(remmina_file_get_string(remminafile, "ssh_hostkeytypes"));
ssh->proxycommand = g_strdup(remmina_file_get_string(remminafile, "ssh_proxycommand"));
ssh->stricthostkeycheck = remmina_file_get_int(remminafile, "ssh_stricthostkeycheck", 0);
gint c = remmina_file_get_int(remminafile, "ssh_compression", 0);
ssh->compression = (c == 1) ? "yes" : "no";

/* Public/Private keys */
s = (ssh_privatekey ? g_strdup(ssh_privatekey) : remmina_ssh_find_identity());
Expand Down Expand Up @@ -679,7 +688,7 @@ remmina_ssh_init_from_ssh(RemminaSSH *ssh, const RemminaSSH *ssh_src)
ssh->kex_algorithms = g_strdup(ssh_src->kex_algorithms);
ssh->ciphers = g_strdup(ssh_src->ciphers);
ssh->hostkeytypes = g_strdup(ssh_src->hostkeytypes);
ssh->stricthostkeycheck = ssh_src->stricthostkeycheck;
ssh->compression = ssh_src->compression;

return TRUE;
}
Expand Down
1 change: 1 addition & 0 deletions remmina/src/remmina_ssh.h
Expand Up @@ -74,6 +74,7 @@ typedef struct _RemminaSSH {
gchar *hostkeytypes;
gchar *proxycommand;
gint stricthostkeycheck;
const gchar *compression;

gchar *error;

Expand Down
1 change: 1 addition & 0 deletions remmina/src/remmina_ssh_plugin.c
Expand Up @@ -1004,6 +1004,7 @@ static const RemminaProtocolSetting remmina_ssh_advanced_settings[] =
{ REMMINA_PROTOCOL_SETTING_TYPE_FOLDER, "sshlogfolder", N_("SSH session log folder"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_TEXT, "sshlogname", N_("SSH session log file name"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "sshlogenabled", N_("Enable SSH session logging at exit"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_compression", N_("Enable SSH compression"), FALSE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "disablepasswordstoring", N_("Disable password storing"), TRUE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_CHECK, "ssh_stricthostkeycheck", N_("Strict host key checking"), TRUE, NULL, NULL },
{ REMMINA_PROTOCOL_SETTING_TYPE_END, NULL, NULL, FALSE, NULL, NULL }
Expand Down

0 comments on commit c9e3a2d

Please sign in to comment.