fix: ssh permission function now turns of $HOME group write

master
Kebler Network System Administrator 2022-01-22 14:28:55 -08:00
parent 67417a609a
commit 5526497923
1 changed files with 3 additions and 0 deletions

View File

@ -1,4 +1,7 @@
#!/bin/bash
ssh_dir_permissions() { ssh_dir_permissions() {
sudo chmod -R g-w $HOME
echo warning turned off group write for $HOME as this can cause ssh failure
sudo chown -R $USER:$USER $HOME/.ssh sudo chown -R $USER:$USER $HOME/.ssh
sudo chmod 00700 $HOME/.ssh sudo chmod 00700 $HOME/.ssh
sudo chmod 600 $HOME/.ssh/authorized_keys sudo chmod 600 $HOME/.ssh/authorized_keys