diff options
Diffstat (limited to 'ssh-agent-loadkey')
-rwxr-xr-x | ssh-agent-loadkey | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ssh-agent-loadkey b/ssh-agent-loadkey index 355a1e4..d3a6d37 100755 --- a/ssh-agent-loadkey +++ b/ssh-agent-loadkey @@ -58,10 +58,13 @@ function __chooser { echo "" __list | sed -e 's/^/\t/' echo "" - echo "Current loaded keys:" - echo "" - __loaded | sed -e 's/^/\t/' - echo "" + + if [ "`LC_ALL=C ssh-add -L`" != "The agent has no identities." ]; then + echo "Current loaded keys:" + echo "" + __loaded | sed -e 's/^/\t/' + echo "" + fi read -rep "Choose key: " n |