Ajout du support pour définition du port d'écoute et formattage de sshd_config
This commit is contained in:
parent
ffbe65189b
commit
49eea7a3eb
73
sshd_config
73
sshd_config
@ -12,28 +12,28 @@
|
|||||||
|
|
||||||
Include /etc/ssh/sshd_config.d/*.conf
|
Include /etc/ssh/sshd_config.d/*.conf
|
||||||
|
|
||||||
Port 22
|
#Port 22
|
||||||
#AddressFamily any
|
#AddressFamily any
|
||||||
#ListenAddress 0.0.0.0
|
#ListenAddress 0.0.0.0
|
||||||
#ListenAddress ::
|
#ListenAddress ::
|
||||||
|
|
||||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
#HostKey /etc/ssh/ssh_host_rsa_key
|
||||||
HostKey /etc/ssh/ssh_host_ecdsa_key
|
#HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||||
HostKey /etc/ssh/ssh_host_rsa_key
|
#HostKey /etc/ssh/ssh_host_ed25519_key
|
||||||
|
|
||||||
# Ciphers and keying
|
# Ciphers and keying
|
||||||
#RekeyLimit default none
|
#RekeyLimit default none
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
#SyslogFacility AUTH
|
#SyslogFacility AUTH
|
||||||
LogLevel VERBOSE
|
#LogLevel INFO
|
||||||
|
|
||||||
# Authentication:
|
# Authentication:
|
||||||
|
|
||||||
#LoginGraceTime 2m
|
#LoginGraceTime 2m
|
||||||
PermitRootLogin no
|
#PermitRootLogin prohibit-password
|
||||||
#StrictModes yes
|
#StrictModes yes
|
||||||
MaxAuthTries 6
|
#MaxAuthTries 6
|
||||||
#MaxSessions 10
|
#MaxSessions 10
|
||||||
|
|
||||||
#PubkeyAuthentication yes
|
#PubkeyAuthentication yes
|
||||||
@ -55,7 +55,7 @@ MaxAuthTries 6
|
|||||||
#IgnoreRhosts yes
|
#IgnoreRhosts yes
|
||||||
|
|
||||||
# To disable tunneled clear text passwords, change to no here!
|
# To disable tunneled clear text passwords, change to no here!
|
||||||
PasswordAuthentication yes
|
#PasswordAuthentication yes
|
||||||
#PermitEmptyPasswords no
|
#PermitEmptyPasswords no
|
||||||
|
|
||||||
# Change to yes to enable challenge-response passwords (beware issues with
|
# Change to yes to enable challenge-response passwords (beware issues with
|
||||||
@ -85,13 +85,13 @@ ChallengeResponseAuthentication no
|
|||||||
# and ChallengeResponseAuthentication to 'no'.
|
# and ChallengeResponseAuthentication to 'no'.
|
||||||
UsePAM yes
|
UsePAM yes
|
||||||
|
|
||||||
AllowAgentForwarding no
|
#AllowAgentForwarding yes
|
||||||
#AllowTcpForwarding yes
|
#AllowTcpForwarding yes
|
||||||
#GatewayPorts no
|
#GatewayPorts no
|
||||||
X11Forwarding no
|
#X11Forwarding yes
|
||||||
#X11DisplayOffset 10
|
#X11DisplayOffset 10
|
||||||
#X11UseLocalhost yes
|
#X11UseLocalhost yes
|
||||||
PermitTTY yes
|
#PermitTTY yes
|
||||||
PrintMotd no
|
PrintMotd no
|
||||||
#PrintLastLog yes
|
#PrintLastLog yes
|
||||||
#TCPKeepAlive yes
|
#TCPKeepAlive yes
|
||||||
@ -107,20 +107,67 @@ PrintMotd no
|
|||||||
#VersionAddendum none
|
#VersionAddendum none
|
||||||
|
|
||||||
# no default banner path
|
# no default banner path
|
||||||
Banner /root/scripts/monosphere_banner.txt
|
#Banner none
|
||||||
|
|
||||||
# Allow client to pass locale environment variables
|
# Allow client to pass locale environment variables
|
||||||
AcceptEnv LANG LC_*
|
AcceptEnv LANG LC_*
|
||||||
|
|
||||||
# override default of no subsystems
|
# override default of no subsystems
|
||||||
Subsystem sftp /usr/lib/ssh/sftp-server -f AUTHPRIV -l INFO
|
#Subsystem sftp /usr/lib/openssh/sftp-server
|
||||||
|
|
||||||
|
# Example of overriding settings on a per-user basis
|
||||||
|
#Match User anoncvs
|
||||||
|
# X11Forwarding no
|
||||||
|
# AllowTcpForwarding no
|
||||||
|
# PermitTTY no
|
||||||
|
# ForceCommand cvs server
|
||||||
|
|
||||||
|
|
||||||
#---Bastion configurations ! CHANGE AT YOUR OWN RISK !---
|
#---Bastion configurations ! CHANGE AT YOUR OWN RISK !---
|
||||||
|
|
||||||
|
#Order by preference
|
||||||
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||||
|
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||||
|
HostKey /etc/ssh/ssh_host_rsa_key
|
||||||
|
|
||||||
|
#Logging
|
||||||
|
LogLevel VERBOSE
|
||||||
|
|
||||||
|
#Authentication settings
|
||||||
|
PermitRootLogin no
|
||||||
|
MaxAuthTries 6
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
PasswordAuthentication yes
|
||||||
|
PermitEmptyPasswords no
|
||||||
|
|
||||||
|
#Forwaring settings
|
||||||
|
AllowAgentForwarding no
|
||||||
|
PermitTTY yes
|
||||||
|
PrintMotd no
|
||||||
|
X11Forwarding no
|
||||||
|
|
||||||
|
#Banner add
|
||||||
|
Banner /root/scripts/monosphere_banner.txt
|
||||||
|
|
||||||
|
#Override subsystem defaults
|
||||||
|
Subsystem sftp /usr/lib/ssh/sftp-server -f AUTHPRIV -l INFO
|
||||||
|
|
||||||
|
#Kex accepted protocols
|
||||||
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
|
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
|
||||||
|
|
||||||
|
#Accepted ciphers
|
||||||
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||||
|
|
||||||
|
#Accepted MACs
|
||||||
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
|
||||||
|
|
||||||
|
#Accepted public key types
|
||||||
PubkeyAcceptedKeyTypes sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com
|
PubkeyAcceptedKeyTypes sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com
|
||||||
|
|
||||||
|
#Per user basis settings
|
||||||
AllowStreamLocalForwarding no
|
AllowStreamLocalForwarding no
|
||||||
Match User *,!ubuntu
|
Match User *,!ubuntu
|
||||||
ForceCommand /opt/public/scripts/server_menu.sh
|
ForceCommand /opt/public/scripts/server_menu.sh
|
||||||
X11Forwarding no
|
X11Forwarding no
|
||||||
|
|
||||||
|
#Used port number
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user