File tree Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Expand file tree Collapse file tree 1 file changed +23
-11
lines changed Original file line number Diff line number Diff 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```
136128Port <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
You can’t perform that action at this time.
0 commit comments