Last active
March 14, 2021 12:59
-
-
Save ChristopherA/86fa0016c7363fc9b305a93bf57ced86 to your computer and use it in GitHub Desktop.
SCP SSH & GPG and Set Folder Permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#on local machine | |
scp -Cvpr .private/ [email protected]:.ssh/ | |
scp -Cvpr .private/ [email protected]:.gnupg/ | |
scp -Cvpr .private/ [email protected]:.profile.local | |
ssh [email protected] | |
#on remote machine | |
sudo -v | |
sudo chown -R christophera ~christophera/.gnupg/ | |
sudo chown -R christophera ~christophera/.gnupg/* | |
sudo chown -R christophera ~christophera/.ssh/* | |
sudo chown -R christophera ~christophera/.ssh/* | |
chmod 755 ~ | |
chmod 600 ~/.ssh/* | |
chmod 600 ~/.ssh/id_* | |
chmod 644 ~/.ssh/*.pub | |
chmod 644 ~/.ssh/authorized_keys | |
chmod 700 ~/.ssh | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg | |
bash ~/.profile.local | |
gpgconf --kill gpg-agent | |
export GPG_TTY=$(tty) | |
echo "test" | gpg --clearsign | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment