@@ -490,7 +490,8 @@ remmina_ssh_init_session(RemminaSSH *ssh)
490490 ssh -> session = ssh_new ();
491491 ssh_options_set (ssh -> session , SSH_OPTIONS_HOST , ssh -> server );
492492 ssh_options_set (ssh -> session , SSH_OPTIONS_PORT , & ssh -> port );
493- ssh_options_set (ssh -> session , SSH_OPTIONS_COMPRESSION , "yes" );
493+ /** @todo add an option to set the compression nad set it to no as the default option */
494+ //ssh_options_set(ssh->session, SSH_OPTIONS_COMPRESSION, "yes");
494495 /* When SSH_OPTIONS_USER is not set, the local user account is used */
495496 if (* ssh -> user != 0 )
496497 ssh_options_set (ssh -> session , SSH_OPTIONS_USER , ssh -> user );
@@ -536,6 +537,12 @@ remmina_ssh_init_session(RemminaSSH *ssh)
536537 }else {
537538 remmina_log_printf ("[SSH] SSH_OPTIONS_STRICTHOSTKEYCHECK does not have a valid value: %d\n" , ssh -> stricthostkeycheck );
538539 }
540+ rc = ssh_options_set (ssh -> session , SSH_OPTIONS_COMPRESSION , ssh -> compression );
541+ if (rc == 0 ) {
542+ remmina_log_printf ("[SSH] SSH_OPTIONS_COMPRESSION has been set to: %s\n" , ssh -> compression );
543+ }else {
544+ remmina_log_printf ("[SSH] SSH_OPTIONS_COMPRESSION does not have a valid value: %s\n" , ssh -> compression );
545+ }
539546
540547 ssh_callbacks_init (ssh -> callback );
541548 if (remmina_log_running ()) {
@@ -646,6 +653,8 @@ remmina_ssh_init_from_file(RemminaSSH *ssh, RemminaFile *remminafile)
646653 ssh -> hostkeytypes = g_strdup (remmina_file_get_string (remminafile , "ssh_hostkeytypes" ));
647654 ssh -> proxycommand = g_strdup (remmina_file_get_string (remminafile , "ssh_proxycommand" ));
648655 ssh -> stricthostkeycheck = remmina_file_get_int (remminafile , "ssh_stricthostkeycheck" , 0 );
656+ gint c = remmina_file_get_int (remminafile , "ssh_compression" , 0 );
657+ ssh -> compression = (c == 1 ) ? "yes" : "no" ;
649658
650659 /* Public/Private keys */
651660 s = (ssh_privatekey ? g_strdup (ssh_privatekey ) : remmina_ssh_find_identity ());
@@ -679,7 +688,7 @@ remmina_ssh_init_from_ssh(RemminaSSH *ssh, const RemminaSSH *ssh_src)
679688 ssh -> kex_algorithms = g_strdup (ssh_src -> kex_algorithms );
680689 ssh -> ciphers = g_strdup (ssh_src -> ciphers );
681690 ssh -> hostkeytypes = g_strdup (ssh_src -> hostkeytypes );
682- ssh -> stricthostkeycheck = ssh_src -> stricthostkeycheck ;
691+ ssh -> compression = ssh_src -> compression ;
683692
684693 return TRUE;
685694}
0 commit comments