Last active
June 10, 2018 14:57
-
-
Save benyanke/9af53c041c3fb4d375b88a06a2c7021f to your computer and use it in GitHub Desktop.
Fix ssh key login on synology
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
#!/bin/bash | |
homedir=$(eval echo ~$USER); | |
sudo chown $USER:users $homedir -R; | |
chmod 700 $homedir; | |
mkdir $homedir/.ssh; | |
touch $homedir/.ssh/authorized_keys; | |
chmod 700 $homedir/.ssh/; | |
chmod 600 $homedir/.ssh/authorized_keys; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment