[201/lab sheet] Make ssh authorised key bit more clear
All checks were successful
continuous-integration/laminar-elessar Build 74 succeeded in 1 minute 15 seconds .
All checks were successful
continuous-integration/laminar-elessar Build 74 succeeded in 1 minute 15 seconds .
This commit is contained in:
parent
117ae241f4
commit
bed2e66772
1 changed files with 4 additions and 3 deletions
|
@ -185,8 +185,8 @@ _If your **local machine** is a Linux computer, then this is the section for you
|
||||||
|
|
||||||
If you are using Linux on your _local machine_ generate your own public-private keypair like so:
|
If you are using Linux on your _local machine_ generate your own public-private keypair like so:
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
mkdir $HOME/.ssh
|
||||||
ssh-keygen -t ed25519
|
ssh-keygen -t ed25519
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -242,13 +242,14 @@ When you’re done, click the "save private key" button and select a secure loca
|
||||||
|
|
||||||
If you have not entered a passphrase, you will be asked to confirm that you want to save the key without one. We strongly recommend using a passphrase, but you can press enter to bypass this prompt.
|
If you have not entered a passphrase, you will be asked to confirm that you want to save the key without one. We strongly recommend using a passphrase, but you can press enter to bypass this prompt.
|
||||||
|
|
||||||
Next, you need to tell your server about your new SSH key. This is done by editing the `~/.ssh/authorized_keys` file. Do that like this:
|
Next, you need to tell your server about your new SSH key. This is done by editing the `~/.ssh/authorized_keys` file. The `~/.ssh/` directory might not exist, so we may need to create that too. Do that like this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
mkdir ~/.ssh/;
|
||||||
nano ~/.ssh/authorized_keys
|
nano ~/.ssh/authorized_keys
|
||||||
```
|
```
|
||||||
|
|
||||||
Paste in your public key that saved earlier. Save it and exit, and then ensure it has the correct permissions like so:
|
Of course, don't worry about any errors telling you that `~/.ssh/` already exists. Next, paste in your public key that saved earlier into the `nano` text editor. Save it and exit (Ctrl + X, then Y, then Enter), and then ensure it has the correct permissions like so:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
chown -R username:username ~/.ssh
|
chown -R username:username ~/.ssh
|
||||||
|
|
Loading…
Reference in a new issue