From a4687ff862041a208f2c97bd09b447339840d84f Mon Sep 17 00:00:00 2001 From: Sandor Semsey Date: Mon, 14 Oct 2024 00:19:05 +0200 Subject: [PATCH] lib/ssh: add --line-regexp flag to grep --- lib/ssh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ssh.sh b/lib/ssh.sh index b0c3e01..2295c39 100644 --- a/lib/ssh.sh +++ b/lib/ssh.sh @@ -23,7 +23,7 @@ unlock-key() { current_identities=$(ssh-add -L || true) # Add key to ssh-agent - if ! grep -qs "${public_key}" <<<"${current_identities}"; then + if ! grep -qsx "${public_key}" <<<"${current_identities}"; then ECHO_WRAP="${password}" DISPLAY=1 SSH_ASKPASS=wrecho ssh-add -t "${cache_time}" "${key}"