forked from leseb/Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsshd_config
58 lines (40 loc) · 1.07 KB
/
sshd_config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
## Hardening ssh conf Leseb
# Port
Port 22
# Protocol to use
Protocol 2
#ListenAddress votre_ip
# Automatically disconnect session due to inactivity (5min)
ClientAliveInterval 300
ClientAliveCountMax 0
# Restrict SSH access to user groups
AllowGroups ssh-users
# KeyBit Lenght
ServerKeyBits 1024
# Enable a warning banner
Banner /etc/issue
# Disable empty passwords
PermitEmptyPasswords no
# Disable root ssh login
PermitRootLogin no
# No not allow users to set environment options
PermitUserEnvironment no
# Disable key authentification
PubkeyAuthentication yes
# Ignore SSH can emulate the behavior of the obsolete rsh command, just disable insecure access via RSH
IgnoreRhosts yes
# Enable password authentification
PasswordAuthentication no
# Disable host-based authentication
HostbasedAuthentication no
# Pam + ssh
UsePAM yes
# Enable tunneling compression
Compression yes
# Hardening
AllowTcpForwarding no
X11Forwarding no
# Check file permission (ssh keys, know hosts...)
StrictModes yes
# Use only approved Ciphers in Counter mode
Ciphers aes128-ctr,aes192-ctr,aes256-ctr