Commit 6e402c85 authored by Antenore Gatta's avatar Antenore Gatta

Added ssh_agent support. Closes #395

parent 509713aa
......@@ -48,7 +48,7 @@ struct _RemminaFile
enum
{
SSH_AUTH_PASSWORD, SSH_AUTH_PUBLICKEY, SSH_AUTH_AUTO_PUBLICKEY
SSH_AUTH_PASSWORD, SSH_AUTH_PUBLICKEY, SSH_AUTH_AGENT, SSH_AUTH_AUTO_PUBLICKEY
};
typedef enum
......
This diff is collapsed.
......@@ -223,6 +223,22 @@ remmina_ssh_auth_auto_pubkey (RemminaSSH* ssh)
return 1;
}
static gint
remmina_ssh_auth_agent (RemminaSSH* ssh)
{
TRACE_CALL("remmina_ssh_auth_agent");
gint ret;
ret = ssh_userauth_agent (ssh->session, NULL);
if (ret != SSH_AUTH_SUCCESS) {
remmina_ssh_set_error (ssh, _("SSH public key authentication with ssh agent failed: %s"));
return 0;
}
ssh->authenticated = TRUE;
return 1;
}
gint
remmina_ssh_auth (RemminaSSH *ssh, const gchar *password)
{
......@@ -247,6 +263,9 @@ remmina_ssh_auth (RemminaSSH *ssh, const gchar *password)
case SSH_AUTH_PUBLICKEY:
return remmina_ssh_auth_pubkey (ssh);
case SSH_AUTH_AGENT:
return remmina_ssh_auth_agent (ssh);
case SSH_AUTH_AUTO_PUBLICKEY:
return remmina_ssh_auth_auto_pubkey (ssh);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment