From f6ae7a38cfec1d4f8abc6d5c13999682efcfca03 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 18 Sep 2013 15:24:32 +0200 Subject: afssh.1.md: complete the sentence. --- afssh.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afssh.1.md b/afssh.1.md index 5d17d2e..7c4ab92 100644 --- a/afssh.1.md +++ b/afssh.1.md @@ -19,7 +19,7 @@ If there are no arguments before `--`, whiptail(1) or dialog(1) is used to ask t After setting up the ssh-agent-filter(1) ssh(1) is started with `-A` and the rest of the arguments (after `--`). -When ssh(1) exits, the ssh-agent-filter(1) is killed to not leave tons of them +When ssh(1) exits, the ssh-agent-filter(1) is killed to not leave tons of them idling. # OPTIONS -- cgit v1.2.3 From 3707680021de040472cd792131a8df42902d08ba Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 18 Sep 2013 16:40:21 +0200 Subject: also print out SSH_AUTH_SOCK in debug mode --- ssh-agent-filter.C | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index a5ff38e..f5f9f08 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -362,6 +362,9 @@ int main (int const argc, char const * const * const argv) { dup2(devnull, 1); dup2(devnull, 2); close(devnull); + } else { + std::cout << "copy this to another terminal:" << std::endl; + std::cout << "SSH_AUTH_SOCK='" << path.native() << "'; export SSH_AUTH_SOCK;" << std::endl; } signal(SIGINT, sighandler); -- cgit v1.2.3 From 59f0ba5eb0a1a4c9bcada66bfe3cf1780e268aff Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 18 Sep 2013 16:43:22 +0200 Subject: add one missing exception activation --- ssh-agent-filter.C | 1 + 1 file changed, 1 insertion(+) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index f5f9f08..733e12d 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -242,6 +242,7 @@ rfc4251string handle_request (rfc4251string const & r) { // temp to test key filtering when signing //return agent_answer; std::istringstream agent_answer_iss{agent_answer}; + agent_answer_iss.exceptions(std::ios::badbit | std::ios::failbit); rfc4251byte answer_code; rfc4251uint32 keycount; agent_answer_iss >> answer_code >> keycount; -- cgit v1.2.3 From 06df197ec118243a073923bb9f6803ffa426ea89 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Thu, 19 Sep 2013 13:15:24 +0200 Subject: ssh-agent-filter.bash-completion: add missing license --- ssh-agent-filter.bash-completion | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ssh-agent-filter.bash-completion b/ssh-agent-filter.bash-completion index c1080f6..4406a0a 100644 --- a/ssh-agent-filter.bash-completion +++ b/ssh-agent-filter.bash-completion @@ -1,3 +1,22 @@ +# bash completion for ssh-agent-filter and afssh +# +# Copyright (C) 2013 Timo Weingärtner +# +# This file is part of ssh-agent-filter. +# +# ssh-agent-filter is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ssh-agent-filter is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ssh-agent-filter. If not, see . + _ssh-agent-filter () { local cur prev words cword opts _init_completion -n : || return -- cgit v1.2.3 From 4b2644c5cf45bb0775e777667aa5a54b9cd6bef8 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sun, 22 Sep 2013 23:23:11 +0200 Subject: add CLOEXEC flag to sockets SOCK_CLOEXEC is currently only available on linux >= 2.6.27 so fcntl is used as a fallback. --- ssh-agent-filter.C | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 733e12d..8d87d0b 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -49,6 +49,9 @@ namespace fs = boost::filesystem; #include "ssh-agent.h" #include "version.h" +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif std::vector allowed_b64; std::vector allowed_md5; @@ -88,10 +91,14 @@ int make_upstream_agent_conn () { exit(EX_UNAVAILABLE); } - if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { + if ((sock = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) == -1) { perror("socket"); exit(EX_UNAVAILABLE); } + if (fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC)) { + perror("fcntl"); + exit(EX_UNAVAILABLE); + } addr.sun_family = AF_UNIX; @@ -114,10 +121,14 @@ int make_listen_sock () { int sock; struct sockaddr_un addr; - if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { + if ((sock = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0)) == -1) { perror("socket"); exit(EX_UNAVAILABLE); } + if (fcntl(sock, F_SETFD, fcntl(sock, F_GETFD) | FD_CLOEXEC)) { + perror("fcntl"); + exit(EX_UNAVAILABLE); + } addr.sun_family = AF_UNIX; -- cgit v1.2.3 From 48ae39cf004d22c0cf96703e382dec41304c3280 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sun, 22 Sep 2013 23:26:20 +0200 Subject: add confirmation via ssh-askpass --- ssh-agent-filter.C | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 8d87d0b..75759d7 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -37,9 +37,11 @@ namespace fs = boost::filesystem; #include #include #include +#include #include #include #include +#include #include #include #include @@ -234,6 +236,27 @@ void setup_filters () { } } +bool confirm (std::string const & question) { + char const * sap; + if (!(sap = getenv("SSH_ASKPASS"))) + sap = "ssh-askpass"; + pid_t pid = fork(); + if (pid < 0) + throw std::runtime_error("fork()"); + if (pid == 0) { + // child + char const * args[3] = { sap, question.c_str(), nullptr }; + // see execvp(3p) for cast rationale + execvp(sap, const_cast(args)); + perror("exec"); + exit(EX_UNAVAILABLE); + } else { + // parent + int status; + return waitpid(pid, &status, 0) > 0 && WIFEXITED(status) && WEXITSTATUS(status) == 0; + } +} + rfc4251string handle_request (rfc4251string const & r) { std::istringstream request{r}; std::ostringstream answer; -- cgit v1.2.3 From cf11590789a66485623ed11508ae137e2b78a96d Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 9 Oct 2013 18:15:57 +0200 Subject: add cmdline options for confirmation --- ssh-agent-filter.C | 55 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 75759d7..b094b2c 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -58,8 +58,14 @@ namespace fs = boost::filesystem; std::vector allowed_b64; std::vector allowed_md5; std::vector allowed_comment; +std::vector confirmed_b64; +std::vector confirmed_md5; +std::vector confirmed_comment; std::set allowed_pubkeys; +std::map confirmed_pubkeys; bool debug{false}; +bool all_confirmed{false}; +std::string saf_name; fs::path path; @@ -157,12 +163,17 @@ int make_listen_sock () { void parse_cmdline (int const argc, char const * const * const argv) { po::options_description opts{"OPTIONS"}; opts.add_options() - ("comment,c", po::value(&allowed_comment), "key specified by comment") - ("debug,d", po::bool_switch(&debug), "show some debug info, don't fork") - ("fingerprint,fp,f", po::value(&allowed_md5), "key specified by pubkey's hex-encoded md5 fingerprint") - ("help,h", "print this help message") - ("key,k", po::value(&allowed_b64), "key specified by base64-encoded pubkey") - ("version,V", "print version information") + ("all-confirmed,A", po::bool_switch(&all_confirmed),"allow all other keys with confirmation") + ("comment,c", po::value(&allowed_comment), "key specified by comment") + ("comment-confirmed,C", po::value(&confirmed_comment), "key specified by comment, with confirmation") + ("debug,d", po::bool_switch(&debug), "show some debug info, don't fork") + ("fingerprint,fp,f", po::value(&allowed_md5), "key specified by pubkey's hex-encoded md5 fingerprint") + ("fingerprint-confirmed,F", po::value(&confirmed_md5), "key specified by pubkey's hex-encoded md5 fingerprint, with confirmation") + ("help,h", "print this help message") + ("key,k", po::value(&allowed_b64), "key specified by base64-encoded pubkey") + ("key-confirmed,K", po::value(&confirmed_b64), "key specified by base64-encoded pubkey, with confirmation") + ("name,n", po::value(&saf_name), "name for this instance of ssh-agent-filter, for confirmation puposes") + ("version,V", "print version information") ; po::variables_map config; store(parse_command_line(argc, argv, opts), config); @@ -219,19 +230,45 @@ void setup_filters () { std::string comm(comment); if (debug) std::clog << comm << std::endl; + bool allow{false}; + if (std::count(allowed_b64.begin(), allowed_b64.end(), b64)) { - allowed_pubkeys.insert(key); + allow = true; if (debug) std::clog << "key allowed by equal base64 representation" << std::endl; } if (std::count(allowed_md5.begin(), allowed_md5.end(), md5)) { - allowed_pubkeys.insert(key); + allow = true; if (debug) std::clog << "key allowed by matching md5 fingerprint" << std::endl; } if (std::count(allowed_comment.begin(), allowed_comment.end(), comm)) { - allowed_pubkeys.insert(key); + allow = true; if (debug) std::clog << "key allowed by matching comment" << std::endl; } + if (allow) allowed_pubkeys.insert(std::move(key)); + else { + bool confirm{false}; + + if (std::count(confirmed_b64.begin(), confirmed_b64.end(), b64)) { + confirm = true; + if (debug) std::clog << "key allowed with confirmation by equal base64 representation" << std::endl; + } + if (std::count(confirmed_md5.begin(), confirmed_md5.end(), md5)) { + confirm = true; + if (debug) std::clog << "key allowed with confirmation by matching md5 fingerprint" << std::endl; + } + if (std::count(confirmed_comment.begin(), confirmed_comment.end(), comm)) { + confirm = true; + if (debug) std::clog << "key allowed with confirmation by matching comment" << std::endl; + } + if (all_confirmed) { + confirm = true; + if (debug) std::clog << "key allowed with confirmation by catch-all (-A)" << std::endl; + } + + if (confirm) confirmed_pubkeys.emplace(std::move(key), comment); + } + if (debug) std::clog << std::endl; } } -- cgit v1.2.3 From be10d6a2c1b646ce3cc67bab2896dd3720a80e64 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 9 Oct 2013 20:18:07 +0200 Subject: improve inserting into (allow|confirm)ed_pubkeys --- ssh-agent-filter.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index b094b2c..16d6f03 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -245,7 +245,7 @@ void setup_filters () { if (debug) std::clog << "key allowed by matching comment" << std::endl; } - if (allow) allowed_pubkeys.insert(std::move(key)); + if (allow) allowed_pubkeys.emplace(std::move(key)); else { bool confirm{false}; @@ -266,7 +266,7 @@ void setup_filters () { if (debug) std::clog << "key allowed with confirmation by catch-all (-A)" << std::endl; } - if (confirm) confirmed_pubkeys.emplace(std::move(key), comment); + if (confirm) confirmed_pubkeys.emplace(std::move(key), std::move(comm)); } if (debug) std::clog << std::endl; -- cgit v1.2.3 From 82f6ec6201c4fb64d0fc9ec43e9c003849ddc6ba Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Fri, 11 Oct 2013 11:45:06 +0200 Subject: update bash-completion for confirmation options --- ssh-agent-filter.bash-completion | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ssh-agent-filter.bash-completion b/ssh-agent-filter.bash-completion index 4406a0a..61debb9 100644 --- a/ssh-agent-filter.bash-completion +++ b/ssh-agent-filter.bash-completion @@ -23,28 +23,31 @@ _ssh-agent-filter () { _quote_readline_by_ref "$cur" cur - opts="--comment --debug --fingerprint --help --key --version" + opts="--all-confirmed --comment --comment-confirmed --debug --fingerprint --fingerprint-confirmed --help --key --key-confirmed --name --version" case "$prev" in - -c|--comment) + -c|--comment|-C|--comment-confirmed) # hm, key comments might contain anything, how can I quote them ? local comments="$(ssh-add -L | cut -d\ -f3- )" COMPREPLY=( $(compgen -W "$comments" -- "$cur") ) return 0 ;; - -f|--fp|--fingerprint) + -f|--fp|--fingerprint|-F|--fingerprint-confirmed) # fingerprints contain many colons local fingerprints="$(ssh-add -l | cut -d\ -f2 )" COMPREPLY=( $(compgen -W "$fingerprints" -- "$cur") ) __ltrim_colon_completions "$cur" return 0 ;; - -k|--key) + -k|--key|-K|--key-confirmed) # this is base64, no quoting needed local keys="$(ssh-add -L | cut -d\ -f2 )" COMPREPLY=( $(compgen -W "$keys" -- "$cur") ) return 0 ;; + -n|--name) + COMPREPLY=( $(compgen -W "" -- "$cur") ) + return 0 esac COMPREPLY=( $(compgen -W "$opts" -- "$cur") ) -- cgit v1.2.3 From 4bea277b6a2efd93321e5d6a0d96c87eb4d4e7c5 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Fri, 11 Oct 2013 11:51:42 +0200 Subject: add confirmed key operations normal ssh authentications get dissected to allow the user a more informed decision. --- ssh-agent-filter.C | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 16d6f03..426c300 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -294,6 +294,27 @@ bool confirm (std::string const & question) { } } +bool dissect_auth_data_ssh (rfc4251string const & data, std::string & request_description) try { + std::istringstream datastream{data}; + datastream.exceptions(std::ios::badbit | std::ios::failbit); + + // Format specified in RFC 4252 Section 7 + rfc4251string session_identifier; datastream >> session_identifier; + rfc4251byte requesttype; datastream >> requesttype; + rfc4251string username; datastream >> username; + rfc4251string servicename; datastream >> servicename; + rfc4251string publickeystring; datastream >> publickeystring; + rfc4251bool shouldbetrue; datastream >> shouldbetrue; + rfc4251string publickeyalgorithm; datastream >> publickeyalgorithm; + rfc4251string publickey; datastream >> publickey; + + request_description = "The request is for an ssh connection as user '" + std::string{username} + "' with service name '" + std::string{servicename} + "'."; + + return true; +} catch (...) { + return false; +} + rfc4251string handle_request (rfc4251string const & r) { std::istringstream request{r}; std::ostringstream answer; @@ -324,7 +345,7 @@ rfc4251string handle_request (rfc4251string const & r) { rfc4251string key; rfc4251string comment; agent_answer_iss >> key >> comment; - if (allowed_pubkeys.count(key)) + if (allowed_pubkeys.count(key) or confirmed_pubkeys.count(key)) keys.emplace_back(std::move(key), std::move(comment)); } answer << answer_code << rfc4251uint32{static_cast(keys.size())}; @@ -335,8 +356,33 @@ rfc4251string handle_request (rfc4251string const & r) { case SSH2_AGENTC_SIGN_REQUEST: { rfc4251string key; - request >> key; - if (allowed_pubkeys.count(key)) { + rfc4251string data; + rfc4251uint32 flags; + request >> key >> data >> flags; + bool allow{false}; + + if (allowed_pubkeys.count(key)) + allow = true; + else { + auto it = confirmed_pubkeys.find(key); + if (it != confirmed_pubkeys.end()) { + std::string request_description; + bool dissect_ok{false}; + if (!dissect_ok) + dissect_ok = dissect_auth_data_ssh(data, request_description); + if (!dissect_ok) + request_description = "The request format is unknown."; + + std::string question = "Something behind the ssh-agent-filter"; + if (saf_name.length()) + question += " named " + saf_name; + question += " requested use of the key named '" + it->second + "'.\n"; + question += request_description; + allow = confirm(question); + } + } + + if (allow) { __gnu_cxx::stdio_filebuf agent_filebuf{make_upstream_agent_conn(), std::ios::in | std::ios::out}; std::iostream agent{&agent_filebuf}; agent.exceptions(std::ios::badbit | std::ios::failbit); -- cgit v1.2.3 From 8401112f358cd35ea72ddf2d67effbf3ac782a5e Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 23 Oct 2013 21:20:29 +0200 Subject: rfc4251.h: add #include --- rfc4251.h | 1 + 1 file changed, 1 insertion(+) diff --git a/rfc4251.h b/rfc4251.h index 80723a9..b2f9658 100644 --- a/rfc4251.h +++ b/rfc4251.h @@ -32,6 +32,7 @@ #include #include #include +#include #include // ntohl() / htonl() #include -- cgit v1.2.3 From fad26b644eef6883810203a1bd143180484ff8fb Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Wed, 23 Oct 2013 21:24:15 +0200 Subject: add quotes around ssh-agent-filter's name --- ssh-agent-filter.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 426c300..dd1b508 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -375,7 +375,7 @@ rfc4251string handle_request (rfc4251string const & r) { std::string question = "Something behind the ssh-agent-filter"; if (saf_name.length()) - question += " named " + saf_name; + question += " named '" + saf_name + "'"; question += " requested use of the key named '" + it->second + "'.\n"; question += request_description; allow = confirm(question); -- cgit v1.2.3 From d8b50eb96e4e4f971803fcf2ba30312b2dac9d08 Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Fri, 25 Oct 2013 21:28:32 +0200 Subject: update documentation to mention confirmation stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks: Christian Amsüss for requesting that feature --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 71b834f..05ca21d 100644 --- a/README.md +++ b/README.md @@ -13,20 +13,27 @@ our solution ------------ 1. create one key(pair) for each realm you connect to -2. load keys into your ssh-agent as usual -3. use ssh-agent-filter to allow only the key(s) you need +2. load keys into your `ssh-agent` as usual +3. use `ssh-agent-filter` to allow only the key(s) you need -afssh (agent filtered ssh) can wrap ssh-agent-filter and ssh for you: +`afssh` (agent filtered ssh) can wrap `ssh-agent-filter` and `ssh` for you, forwarding only the key with the comment `id_example`: - $ afssh -c id_example -- example.com + $ afssh --comment id_example -- example.com -starts an `ssh-agent-filter -c id_example`, runs `ssh -A example.com` and kills the ssh-agent-filter afterwards. +starts an `ssh-agent-filter --comment id_example`, runs `ssh -A example.com` and kills the `ssh-agent-filter` afterwards. If you leave out the options before the `--`: $ afssh -- example.com -it will ask you via whiptail or dialog which keys you want to have forwarded. +it will ask you via `whiptail` or `dialog` which keys you want to have forwarded. + + +confirmation +------------ + +You can use the `--*-confirmed` options (e.g.`--comment-confirmed`) to add keys for which you want to be asked on each use through the filter. +The confirmation is done in the same way as when you `ssh-add -c` a key to your `ssh-agent`, but the question will contain some additional information extracted from the sign request. how it works -- cgit v1.2.3 From 5d55704009d1052db6f4039544aedb17ca8f541b Mon Sep 17 00:00:00 2001 From: chrysn Date: Sat, 26 Oct 2013 00:50:36 +0200 Subject: ssh-askpass-noinput: a simpler confirmation dialog this adds an ssh-askpass imlementation that will only show allow/deny buttons and is based on zenity. --- Makefile | 2 +- ssh-askpass-noinput | 3 +++ ssh-askpass-noinput.1.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100755 ssh-askpass-noinput create mode 100644 ssh-askpass-noinput.1.md diff --git a/Makefile b/Makefile index 644b055..f07d0d1 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ CXXFLAGS ?= -g -O2 -Wall -Wold-style-cast CXXFLAGS += -std=c++11 LDFLAGS += -lstdc++ -lboost_program_options -lboost_filesystem -lboost_system -lnettle -all: ssh-agent-filter.1 afssh.1 +all: ssh-agent-filter.1 afssh.1 ssh-askpass-noinput.1 %.1: %.1.md pandoc -s -w man $< -o $@ diff --git a/ssh-askpass-noinput b/ssh-askpass-noinput new file mode 100755 index 0000000..2954b88 --- /dev/null +++ b/ssh-askpass-noinput @@ -0,0 +1,3 @@ +#!/bin/sh + +exec zenity --question --title "SSH Request" --no-markup --text "$1" --ok-label Allow --cancel-label Deny diff --git a/ssh-askpass-noinput.1.md b/ssh-askpass-noinput.1.md new file mode 100644 index 0000000..2c9ce73 --- /dev/null +++ b/ssh-askpass-noinput.1.md @@ -0,0 +1,48 @@ +% SSH-ASKPASS-NOINPUT +% chrysn +% 2013-10-26 + +# NAME + +ssh-askpass-noinput - an `ssh-askpass` implementation for asking allow/deny questions + +# SYNOPSIS + +*ssh-askpass-noinput* text + +# DESCRIPTION + +*ssh-askpass-noinput* is an implementation of *ssh-askpass*, which does not +acutally ask for a password; instead, it only asks a binary (allow/deny) +question and exits with 0 for allow and 1 for deny. + +It is not intended as a general replacement for *ssh-askpass*, but for special +applications that don't care about a passphrase. + +# OPTIONS + +As usual with *ssh-askpass* implementations, *ssh-askpass-noinput* only takes a +single argument, which will be presented as the question. + +# BACKGROUND AND APPLICATIONS + +Some programs (*ssh-agent* and *ssh-agent-filter*) use *ssh-askpass* to have +users confirm actions without entering a passphrase; *ssh-agent* does this when +used via *ssh-add*'s `-c` option. They do not indicate that it is a binary +question (because in the classical *ssh-agent* invocation, there is no option to +do this), and expect the user to ignore the text input and click "OK" or +"Cancel", whereupon they read the askpass's exit status. + +With programs that are known to only ask those questions, setting +`SSH_ASKPASS=ssh-askpass-noinput` in their environment will make them use this +particular implementation for their questions. It should never be installed as +`/usr/bin/ssh-askpass`. + +# FUTURE + +This solution is obviously a hack, which is needed until a way is established +and implemented for *ssh-askpass* to be used more flexibly. + +# SEE ALSO + +ssh-agent-filter(1), ssh-agent(1), ssh-askpass(1) -- cgit v1.2.3 From bd2154e05c0ab15d8e25f997fb4e6ec61f7a4c1f Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sat, 26 Oct 2013 01:18:11 +0200 Subject: release 0.3 --- changelog | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ version.h | 2 +- 2 files changed, 102 insertions(+), 1 deletion(-) diff --git a/changelog b/changelog index a260eeb..87a658b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,104 @@ +commit 5d55704009d1052db6f4039544aedb17ca8f541b +Author: chrysn +Date: 2013-10-26 00:50:36 +0200 + + ssh-askpass-noinput: a simpler confirmation dialog + + this adds an ssh-askpass imlementation that will only show allow/deny + buttons and is based on zenity. + +commit d8b50eb96e4e4f971803fcf2ba30312b2dac9d08 +Author: Timo Weingärtner +Date: 2013-10-25 21:28:32 +0200 + + update documentation to mention confirmation stuff + + Thanks: Christian Amsüss for requesting that feature + +commit fad26b644eef6883810203a1bd143180484ff8fb +Author: Timo Weingärtner +Date: 2013-10-23 21:24:15 +0200 + + add quotes around ssh-agent-filter's name + +commit 8401112f358cd35ea72ddf2d67effbf3ac782a5e +Author: Timo Weingärtner +Date: 2013-10-23 21:20:29 +0200 + + rfc4251.h: add #include + +commit 4bea277b6a2efd93321e5d6a0d96c87eb4d4e7c5 +Author: Timo Weingärtner +Date: 2013-10-11 11:51:42 +0200 + + add confirmed key operations + + normal ssh authentications get dissected to allow the user a more + informed decision. + +commit 82f6ec6201c4fb64d0fc9ec43e9c003849ddc6ba +Author: Timo Weingärtner +Date: 2013-10-11 11:45:06 +0200 + + update bash-completion for confirmation options + +commit be10d6a2c1b646ce3cc67bab2896dd3720a80e64 +Author: Timo Weingärtner +Date: 2013-10-09 20:18:07 +0200 + + improve inserting into (allow|confirm)ed_pubkeys + +commit cf11590789a66485623ed11508ae137e2b78a96d +Author: Timo Weingärtner +Date: 2013-10-09 18:15:57 +0200 + + add cmdline options for confirmation + +commit 48ae39cf004d22c0cf96703e382dec41304c3280 +Author: Timo Weingärtner +Date: 2013-09-22 23:26:20 +0200 + + add confirmation via ssh-askpass + +commit 4b2644c5cf45bb0775e777667aa5a54b9cd6bef8 +Author: Timo Weingärtner +Date: 2013-09-22 23:23:11 +0200 + + add CLOEXEC flag to sockets + + SOCK_CLOEXEC is currently only available on linux >= 2.6.27 so fcntl is used + as a fallback. + +commit 06df197ec118243a073923bb9f6803ffa426ea89 +Author: Timo Weingärtner +Date: 2013-09-19 13:15:24 +0200 + + ssh-agent-filter.bash-completion: add missing license + +commit 59f0ba5eb0a1a4c9bcada66bfe3cf1780e268aff +Author: Timo Weingärtner +Date: 2013-09-18 16:43:22 +0200 + + add one missing exception activation + +commit 3707680021de040472cd792131a8df42902d08ba +Author: Timo Weingärtner +Date: 2013-09-18 16:40:21 +0200 + + also print out SSH_AUTH_SOCK in debug mode + +commit f6ae7a38cfec1d4f8abc6d5c13999682efcfca03 +Author: Timo Weingärtner +Date: 2013-09-18 15:24:32 +0200 + + afssh.1.md: complete the sentence. + +commit ad2ee59254259fb117a16f3cc60c9a19b7c78ab9 (tag: 0.2) +Author: Timo Weingärtner +Date: 2013-09-08 17:20:11 +0200 + + release 0.2 + commit bd8e837efbc00eb49607ca493287d307ea47697b Author: Timo Weingärtner Date: 2013-09-01 12:32:55 +0200 diff --git a/version.h b/version.h index 5acbd1c..964fa23 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define SSH_AGENT_FILTER_VERSION "ssh-agent-filter 0.2" +#define SSH_AGENT_FILTER_VERSION "ssh-agent-filter 0.3" -- cgit v1.2.3