Fix add-sshkey for MacOS

This commit is contained in:
2021-01-25 16:49:10 +00:00
parent 556f8a6912
commit 68e9aca5ac

View File

@@ -21,8 +21,8 @@ function add-sshkey() {
echo "Current Keys"
ssh-add -L
else
if [ -f "~/.ssh/id_ed25519_${NAME}" ]; then
ssh-add -t $TIMEOUT "~/.ssh/id_ed25519_${NAME}"
if [ -f "$HOME/.ssh/id_ed25519_${NAME}" ]; then
ssh-add -t $TIMEOUT "$HOME/.ssh/id_ed25519_${NAME}"
else
echo "No key named ${NAME} found..."
fi