Skip to content

Commit 36bdab5

Browse files
committed
SSH notes updates (Server configuration)
1 parent cabb405 commit 36bdab5

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

SSH/README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,23 +119,35 @@ Host <server-alias>
119119
---
120120

121121
## Server Configuration
122+
Location `/etc/ssh/sshd_config`
122123

123-
### Disable both password and keyboard-interactive
124+
### Enhance server security
124125

125-
1. `sudo vim /etc/ssh/sshd_config`
126-
2. Set the following options:
127-
```
128-
PasswordAuthentication no
129-
ChallengeResponseAuthentication no
130-
UsePAM no
131-
```
132-
3. `sudo systemctl restart ssh`
133-
134-
### Change port to another one
126+
#### 1. Change port to another one
135127
```
136128
Port <port_num>
137129
```
138130

131+
#### 2. Disable both password and keyboard-interactive
132+
```
133+
PasswordAuthentication no
134+
ChallengeResponseAuthentication no
135+
UsePAM no
136+
```
137+
138+
#### 3. Disable root connection
139+
```
140+
PermitRootLogin no
141+
```
142+
143+
#### Restart sshd
144+
```
145+
sudo systemctl restart ssh
146+
```
147+
148+
#### Use a firewall
149+
Use a firewall to allow only to specific ports connections.
150+
139151
---
140152

141153
## Other connections

0 commit comments

Comments
 (0)