Skip to content

Commit f464dd8

Browse files
committed
chore: update dependency and home page
1 parent ac73e59 commit f464dd8

File tree

9 files changed

+2599
-1232
lines changed

9 files changed

+2599
-1232
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Secure Your Server
3+
description: A comprehensive guide on securing your Next Hat server.
4+
tags:
5+
- security
6+
- server
7+
- infrastructure
8+
- guide
9+
---
10+
11+
Below are the essential steps to secure your Next Hat server:
12+
13+
## Create your user
14+
15+
It is important to avoid using the root user for daily operations. Instead, create a new user with sudo and nanocl privileges.
16+
17+
Create a new user and it's home directory:
18+
19+
```bash
20+
adduser your_username
21+
```
22+
23+
Add the new user to the sudo group:
24+
25+
```bash
26+
usermod -aG sudo your_username
27+
```
28+
29+
Add the new user to the nanocl group:
30+
31+
```bash
32+
usermod -aG nanocl your_username
33+
```
34+
35+
Replace `your_username` with your desired username.
36+
37+
## Set up SSH key authentication
38+
39+
To enhance security, disable password authentication and use SSH keys for logging in.
40+
41+
1. Generate an SSH key pair on your **local machine** (if you haven't already):
42+
43+
```bash
44+
ssh-keygen -t ed25519
45+
```
46+
47+
:::caution
48+
DO NOT SET AN EMPTY PASSPHRASE FOR YOUR SSH KEY. SOME MALICIOUS ACTORS MAY STEAL YOUR PRIVATE KEY AND ACCESS YOUR SERVER.
49+
:::
50+
51+
2. Copy the public key to your server:
52+
53+
```bash
54+
ssh-copy-id -i ~/.ssh/<your_key>.pub your_username@your_server
55+
```
56+
57+
3. Edit the SSH configuration file on your server:
58+
59+
```bash
60+
sudo vim /etc/ssh/sshd_config
61+
```
62+
63+
4. Find and modify the following lines:
64+
65+
```plaintext
66+
PasswordAuthentication no
67+
PermitRootLogin no
68+
```
69+
70+
5. Restart the SSH service:
71+
72+
```bash
73+
sudo systemctl restart ssh
74+
```

docusaurus.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ const config = {
1414
url: 'https://docs.next-hat.com',
1515
baseUrl: '/',
1616
onBrokenLinks: 'throw',
17-
onBrokenMarkdownLinks: 'warn',
1817
favicon: 'img/logo3.png',
18+
markdown: {
19+
hooks: {
20+
onBrokenMarkdownLinks: 'warn',
21+
},
22+
},
1923
trailingSlash: false,
2024
// GitHub pages deployment config.
2125
// If you aren't using GitHub pages, you don't need these.

0 commit comments

Comments
 (0)