This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
2022-01-22 14:28:55 -08:00
|
|
|
#!/bin/bash
|
2021-11-20 17:39:07 -08:00
|
|
|
ssh_dir_permissions() {
|
2022-01-22 14:28:55 -08:00
|
|
|
sudo chmod -R g-w $HOME
|
|
|
|
echo warning turned off group write for $HOME as this can cause ssh failure
|
2021-11-20 17:39:07 -08:00
|
|
|
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
|
|
|
|
}
|