diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2019-03-20 19:17:46 +0100 |
---|---|---|
committer | Nicolas Viennot <nicolas@viennot.biz> | 2019-04-09 08:15:07 -0400 |
commit | fd4ac27d59604aae0117ad578b1a7e6dccf97bf7 (patch) | |
tree | be9b5c44e657b043aa098bdfb9200cde8bbac76d | |
parent | 32d48cbc9df07045af43e0e8d76bd7a58647cce1 (diff) |
ssh-client: Don't use keys from the ssh-agent
Fixes #138
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | tmate-ssh-client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tmate-ssh-client.c b/tmate-ssh-client.c index bdad138d..96da14c8 100644 --- a/tmate-ssh-client.c +++ b/tmate-ssh-client.c @@ -2,6 +2,7 @@ #include <netinet/in.h> #include <netinet/tcp.h> #include <stdio.h> +#include <stdlib.h> #include <event.h> #include <assert.h> @@ -260,6 +261,9 @@ static void on_ssh_client_event(struct tmate_ssh_client *client) * regular one doesn't. */ ssh_options_set(session, SSH_OPTIONS_IDENTITY, identity); + + /* Do not use keys from ssh-agent. */ + unsetenv("SSH_AUTH_SOCK"); free(identity); } |