From 31b912b2c93821fd707db1bbf4253e7b71257695 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Fri, 16 Jul 2021 10:05:29 -0700 Subject: [PATCH] more specific grep pattern --- makeitso | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makeitso b/makeitso index 99d4501..1fcc7ee 100755 --- a/makeitso +++ b/makeitso @@ -10,7 +10,7 @@ if [ ! -d /home/authorizedkeysuser ]; then sudo useradd -c 'User for AuthorizedKeysCommand' -d /home/authorizedkeysuser -m -s/usr/sbin/nologin authorizedkeysuser fi -grep -q AuthorizedKeysCommand /etc/ssh/sshd_config || \ +grep -qF 'AuthorizedKeysCommand /etc/ssh/get_authorized_keys' /etc/ssh/sshd_config || \ sudo sh -c "echo 'Match User $1 AuthorizedKeysCommand /etc/ssh/get_authorized_keys AuthorizedKeysCommandUser authorizedkeysuser' >> /etc/ssh/sshd_config"