Add public key to authorized_keys
This commit is contained in:
parent
d0d61fe69a
commit
5f0c933f37
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
BASE_PACKAGES="kitty-terminfo gpg git curl wget ripgrep fd-find unzip python3-pip htop fzf bat"
|
||||
BASE_PACKAGES="kitty-terminfo gpg git curl wget ripgrep fd-find unzip python3-pip htop fzf bat awk"
|
||||
USER=$(whoami)
|
||||
Green='\033[0;32m' # Green
|
||||
NC='\033[0m' # No Color
|
||||
|
8
run_onchange_before_authorized_keys.sh
Normal file
8
run_onchange_before_authorized_keys.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cp ~/.ssh/authorized_keys ~/.ssh/authorized_keys.old 2>/dev/null || true
|
||||
|
||||
##print only unique lines
|
||||
cat ~/.ssh/authorized_keys.old <(echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdqIDeRKDOh7NQDcqnmLH/6M0ys7Wt/SEnF6ZYqroiH") 2>/dev/null | awk '!seen[$1]++' > ~/.ssh/authorized_keys
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user