From 5126dd361917296147751cc54935fdcdfb67e81e Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 25 Jun 2020 04:50:49 +0000 Subject: [PATCH] correct perms on .ssh --- ssh-utils/ssh-pubkey.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ssh-utils/ssh-pubkey.sh b/ssh-utils/ssh-pubkey.sh index 9f07229..074a098 100644 --- a/ssh-utils/ssh-pubkey.sh +++ b/ssh-utils/ssh-pubkey.sh @@ -4,7 +4,10 @@ set -e set -u - mkdir -p "$HOME/.ssh/" + if [ ! -d "$HOME/.ssh" ]; then + mkdir -p "$HOME/.ssh/" + chmod 0700 "$HOME/.ssh/" + fi if [ ! -f "$HOME/.ssh/id_rsa" ]; then ssh-keygen -b 2048 -t rsa -f "$HOME/.ssh/id_rsa" -q -N "" -- 2.25.1