From e7edbe2669ab743dc6683dcbbbf6dcf1ddc092cc Mon Sep 17 00:00:00 2001 From: Illia Chub Date: Wed, 25 Aug 2021 08:07:02 +0300 Subject: [PATCH] Fixed logical mistakes in public key insertion mechanism --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 335bdc2..28c8f8f 100755 --- a/main.py +++ b/main.py @@ -372,7 +372,7 @@ def readKey(): if "openssh.authorizedKeys.keys = [" in line: print("[DEBUG] Found SSH key configuration snippet match!") print("[INFO] Writing new SSH key", sep="") - fileContent.insert(index, "\n \"" + publicKey + "\"") + fileContent.append(index, "\n \"" + publicKey + "\"") print("done") break