Re: [PATCH v2] ssh-add: support external parsing of key listing

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On 2025-01-10 09:33, Morgan, Iain (ARC-TN)[InuTeq, LLC] via openssh-
unix-dev wrote:
What about simply modifying your script?  For example, instead of
simply doing "ssh-add -l," you could use "ssh-add -l | grep
SHA256."  This would eliminate any non-key output to stdout, but
admiteedly assumes that the fingerprint algorithm does not change.

Thanks but I think that also can't differentiate between "no keys in agent" and "agent not present/not working".

The check I have in place currently is:

if ! KEY_LISTING=$(ssh-add -l) ; then
    if [ "$KEY_LISTING" = "The agent has no identities." ] ; then
        KEY_LISTING=""
    else
        echo "SSH agent error" >&2
        exit 2
    fi
fi

I did think it would be nicer in the long run to get a change in upstream to make this easier.

Thanks,
Corey
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev



[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux