aboutsummaryrefslogtreecommitdiff
path: root/ssh-agent-loadkey
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-03-09 15:43:07 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-03-09 15:43:07 -0300
commit41c73361b3b7bd129cac249b7cb59c43a303733b (patch)
tree7debb42ad2176f315226ac044cd1b9f4e45bd817 /ssh-agent-loadkey
parentb40a7d116a1dde72d48b1e9ea549f9918399f8b7 (diff)
downloadutils-ssh-41c73361b3b7bd129cac249b7cb59c43a303733b.tar.gz
utils-ssh-41c73361b3b7bd129cac249b7cb59c43a303733b.tar.bz2
Display available keys att ssh-agent-loadkey
Diffstat (limited to 'ssh-agent-loadkey')
-rwxr-xr-xssh-agent-loadkey3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssh-agent-loadkey b/ssh-agent-loadkey
index 610f10b..e02bd1f 100755
--- a/ssh-agent-loadkey
+++ b/ssh-agent-loadkey
@@ -11,6 +11,9 @@ HANDLE="$2"
# Check
if [ -z "$HANDLE" ]; then
echo "usage: $BASENAME <keytype> <handle>"
+ echo "available keys:"
+ echo ""
+ ( cd $HOME/.ssh/keys && find -name '*.pub' ) | grep -v decomissioned | sed -e 's/^/\t/'
exit 1
elif [ ! -e "$HOME/.ssh/keys/$TYPE/$HANDLE" ]; then
echo "$BASENAME: file not found: $HOME/.ssh/keys/$TYPE/$HANDLE"