ssh-client: Don't use keys from the ssh-agent

Fixes #138

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider 2019-03-20 19:17:46 +01:00 committed by Nicolas Viennot
parent 32d48cbc9d
commit fd4ac27d59

View File

@ -2,6 +2,7 @@
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h>
#include <event.h> #include <event.h>
#include <assert.h> #include <assert.h>
@ -260,6 +261,9 @@ static void on_ssh_client_event(struct tmate_ssh_client *client)
* regular one doesn't. * regular one doesn't.
*/ */
ssh_options_set(session, SSH_OPTIONS_IDENTITY, identity); ssh_options_set(session, SSH_OPTIONS_IDENTITY, identity);
/* Do not use keys from ssh-agent. */
unsetenv("SSH_AUTH_SOCK");
free(identity); free(identity);
} }