Skip to content

Commit

Permalink
better sudo copy handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jonluca committed Mar 8, 2018
1 parent dc2cbf1 commit 002faf8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lesson-6/README.md
Expand Up @@ -88,10 +88,7 @@ Then you'll want to set SSH up with
mkdir ~/.ssh
chmod 700 ~/.ssh
cd ~/.ssh
sudo cp /root/.ssh/authorized_keys .
sudo rm /root/.ssh/authorized_keys
sudo chown `whoami` authorized_keys
chmod 600 ~/.ssh/authorized_keys
sudo cp /root/.ssh/authorized_keys . ; sudo rm /root/.ssh/authorized_keys; sudo chown `whoami` authorized_keys; chmod 600 ~/.ssh/authorized_keys
```

Let's go over what this is doing - it creates the ssh directory, and sets the correct permissions. Then we enter it, copy the ssh key we originally set up for root and delete it for root, then take ownership of the file. Finally, we change the permissions of the actual authorized keys file.
Expand Down

0 comments on commit 002faf8

Please sign in to comment.