12 lines
385 B
Bash
12 lines
385 B
Bash
#!/bin/bash
|
|
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 chmod 00700 $HOME/.ssh
|
|
sudo chmod 600 $HOME/.ssh/authorized_keys
|
|
sudo chmod 400 $HOME/.ssh/id_rsa
|
|
sudo chmod 644 $HOME/.ssh/id_rsa.pub
|
|
sudo chmod 600 $HOME/.ssh/known_hosts
|
|
}
|