| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1 @@ |
| 1 |
+CRYPTO_POLICY='-oCiphers=aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc -oMACs=hmac-sha2-256-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512 -oGSSAPIKexAlgorithms=gss-gex-sha1-,gss-group14-sha1- -oKexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1 -oHostKeyAlgorithms=rsa-sha2-256,ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com -oPubkeyAcceptedKeyTypes=rsa-sha2-256,ecdsa-sha2-nistp256,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384,ecdsa-sha2-nistp384-cert-v01@openssh.com,rsa-sha2-512,ecdsa-sha2-nistp521,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,ssh-rsa,ssh-rsa-cert-v01@openssh.com' |
|
| 0 | 2 |
\ No newline at end of file |
| ... | ... |
@@ -1,71 +1,68 @@ |
| 1 |
-# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ |
|
| 1 |
+# $OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $ |
|
| 2 | 2 |
|
| 3 | 3 |
# This is the sshd server system-wide configuration file. See |
| 4 | 4 |
# sshd_config(5) for more information. |
| 5 | 5 |
|
| 6 |
-# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin |
|
| 6 |
+# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin |
|
| 7 | 7 |
|
| 8 | 8 |
# The strategy used for options in the default sshd_config shipped with |
| 9 | 9 |
# OpenSSH is to specify options with their default value where |
| 10 |
-# possible, but leave them commented. Uncommented options change a |
|
| 10 |
+# possible, but leave them commented. Uncommented options override the |
|
| 11 | 11 |
# default value. |
| 12 | 12 |
|
| 13 |
-Port 1025 |
|
| 13 |
+# If you want to change the port on a SELinux system, you have to tell |
|
| 14 |
+# SELinux about this change. |
|
| 15 |
+# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER |
|
| 16 |
+# |
|
| 17 |
+#Port 22 |
|
| 14 | 18 |
#AddressFamily any |
| 15 | 19 |
#ListenAddress 0.0.0.0 |
| 16 | 20 |
#ListenAddress :: |
| 17 | 21 |
|
| 18 |
-# Disable legacy (protocol version 1) support in the server for new |
|
| 19 |
-# installations. In future the default will change to require explicit |
|
| 20 |
-# activation of protocol 1 |
|
| 21 |
-Protocol 2 |
|
| 22 |
- |
|
| 23 |
-# HostKey for protocol version 1 |
|
| 24 |
-#HostKey /etc/ssh/ssh_host_key |
|
| 25 |
-# HostKeys for protocol version 2 |
|
| 26 |
-# |
|
| 27 |
-# DSA host keys disabled, by Veselin Kolev <vlk@lcpe.uni-sofia.bg> - Fri, Jul 12, 2019 |
|
| 28 |
-# |
|
| 29 |
-# Note: DSA algo is considered weak. Avoid DSA keys auto generation, by specifying: |
|
| 30 |
-# |
|
| 31 |
-# AUTOCREATE_SERVER_KEYS=NO |
|
| 32 |
-# |
|
| 33 |
-# in /etc/sysconfig/sshd and removing/renaming subsequently /etc/ssh/ssh_host_dsa_key, |
|
| 34 |
-# and /etc/ssh/ssh_host_dsa_key.pub |
|
| 35 |
-# |
|
| 36 | 22 |
HostKey /etc/ssh/ssh_host_rsa_key |
| 37 | 23 |
HostKey /etc/ssh/ssh_host_ecdsa_key |
| 24 |
+HostKey /etc/ssh/ssh_host_ed25519_key |
|
| 38 | 25 |
|
| 39 |
-# Lifetime and size of ephemeral version 1 server key |
|
| 40 |
-#KeyRegenerationInterval 1h |
|
| 41 |
-#ServerKeyBits 1024 |
|
| 26 |
+# Ciphers and keying |
|
| 27 |
+#RekeyLimit default none |
|
| 28 |
+ |
|
| 29 |
+# System-wide Crypto policy: |
|
| 30 |
+# This system is following system-wide crypto policy. The changes to |
|
| 31 |
+# Ciphers, MACs, KexAlgoritms and GSSAPIKexAlgorithsm will not have any |
|
| 32 |
+# effect here. They will be overridden by command-line options passed on |
|
| 33 |
+# the server start up. |
|
| 34 |
+# To opt out, uncomment a line with redefinition of CRYPTO_POLICY= |
|
| 35 |
+# variable in /etc/sysconfig/sshd to overwrite the policy. |
|
| 36 |
+# For more information, see manual page for update-crypto-policies(8). |
|
| 42 | 37 |
|
| 43 | 38 |
# Logging |
| 44 |
-# obsoletes QuietMode and FascistLogging |
|
| 45 | 39 |
#SyslogFacility AUTH |
| 46 | 40 |
SyslogFacility AUTHPRIV |
| 47 |
-LogLevel VERBOSE |
|
| 41 |
+#LogLevel INFO |
|
| 48 | 42 |
|
| 49 | 43 |
# Authentication: |
| 50 | 44 |
|
| 51 | 45 |
#LoginGraceTime 2m |
| 52 |
-#PermitRootLogin yes |
|
| 46 |
+PermitRootLogin yes |
|
| 53 | 47 |
#StrictModes yes |
| 54 | 48 |
#MaxAuthTries 6 |
| 55 | 49 |
#MaxSessions 10 |
| 56 | 50 |
|
| 57 |
-#RSAAuthentication yes |
|
| 58 | 51 |
#PubkeyAuthentication yes |
| 59 |
-#AuthorizedKeysFile .ssh/authorized_keys |
|
| 52 |
+ |
|
| 53 |
+# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 |
|
| 54 |
+# but this is overridden so installations will only check .ssh/authorized_keys |
|
| 55 |
+AuthorizedKeysFile .ssh/authorized_keys |
|
| 56 |
+ |
|
| 57 |
+#AuthorizedPrincipalsFile none |
|
| 58 |
+ |
|
| 60 | 59 |
#AuthorizedKeysCommand none |
| 61 |
-#AuthorizedKeysCommandRunAs nobody |
|
| 60 |
+#AuthorizedKeysCommandUser nobody |
|
| 62 | 61 |
|
| 63 | 62 |
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts |
| 64 |
-#RhostsRSAAuthentication no |
|
| 65 |
-# similar for protocol version 2 |
|
| 66 | 63 |
#HostbasedAuthentication no |
| 67 | 64 |
# Change to yes if you don't trust ~/.ssh/known_hosts for |
| 68 |
-# RhostsRSAAuthentication and HostbasedAuthentication |
|
| 65 |
+# HostbasedAuthentication |
|
| 69 | 66 |
#IgnoreUserKnownHosts no |
| 70 | 67 |
# Don't read the user's ~/.rhosts and ~/.shosts files |
| 71 | 68 |
#IgnoreRhosts yes |
| ... | ... |
@@ -73,7 +70,7 @@ LogLevel VERBOSE |
| 73 | 70 |
# To disable tunneled clear text passwords, change to no here! |
| 74 | 71 |
#PasswordAuthentication yes |
| 75 | 72 |
#PermitEmptyPasswords no |
| 76 |
-PasswordAuthentication no |
|
| 73 |
+PasswordAuthentication no |
|
| 77 | 74 |
|
| 78 | 75 |
# Change to no to disable s/key passwords |
| 79 | 76 |
#ChallengeResponseAuthentication yes |
| ... | ... |
@@ -87,15 +84,14 @@ ChallengeResponseAuthentication no |
| 87 | 84 |
#KerberosUseKuserok yes |
| 88 | 85 |
|
| 89 | 86 |
# GSSAPI options |
| 90 |
-#GSSAPIAuthentication no |
|
| 91 | 87 |
GSSAPIAuthentication yes |
| 92 |
-#GSSAPICleanupCredentials yes |
|
| 93 |
-GSSAPICleanupCredentials yes |
|
| 88 |
+GSSAPICleanupCredentials no |
|
| 94 | 89 |
#GSSAPIStrictAcceptorCheck yes |
| 95 | 90 |
#GSSAPIKeyExchange no |
| 91 |
+#GSSAPIEnablek5users no |
|
| 96 | 92 |
|
| 97 |
-# Set this to 'yes' to enable PAM authentication, account processing, |
|
| 98 |
-# and session processing. If this is enabled, PAM authentication will |
|
| 93 |
+# Set this to 'yes' to enable PAM authentication, account processing, |
|
| 94 |
+# and session processing. If this is enabled, PAM authentication will |
|
| 99 | 95 |
# be allowed through the ChallengeResponseAuthentication and |
| 100 | 96 |
# PasswordAuthentication. Depending on your PAM configuration, |
| 101 | 97 |
# PAM authentication via ChallengeResponseAuthentication may bypass |
| ... | ... |
@@ -103,27 +99,24 @@ GSSAPICleanupCredentials yes |
| 103 | 99 |
# If you just want the PAM account and session checks to run without |
| 104 | 100 |
# PAM authentication, then enable this but set PasswordAuthentication |
| 105 | 101 |
# and ChallengeResponseAuthentication to 'no'. |
| 106 |
-#UsePAM no |
|
| 102 |
+# WARNING: 'UsePAM no' is not supported in Fedora and may cause several |
|
| 103 |
+# problems. |
|
| 107 | 104 |
UsePAM yes |
| 108 | 105 |
|
| 109 |
-# Accept locale-related environment variables |
|
| 110 |
-AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES |
|
| 111 |
-AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT |
|
| 112 |
-AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE |
|
| 113 |
-AcceptEnv XMODIFIERS |
|
| 114 |
- |
|
| 115 | 106 |
#AllowAgentForwarding yes |
| 116 | 107 |
#AllowTcpForwarding yes |
| 117 | 108 |
#GatewayPorts no |
| 118 |
-#X11Forwarding no |
|
| 119 | 109 |
X11Forwarding yes |
| 120 | 110 |
#X11DisplayOffset 10 |
| 121 | 111 |
#X11UseLocalhost yes |
| 122 |
-#PrintMotd yes |
|
| 112 |
+#PermitTTY yes |
|
| 113 |
+ |
|
| 114 |
+# It is recommended to use pam_motd in /etc/pam.d/sshd instead of PrintMotd, |
|
| 115 |
+# as it is more configurable and versatile than the built-in version. |
|
| 116 |
+PrintMotd no |
|
| 117 |
+ |
|
| 123 | 118 |
#PrintLastLog yes |
| 124 | 119 |
#TCPKeepAlive yes |
| 125 |
-#UseLogin no |
|
| 126 |
-#UsePrivilegeSeparation yes |
|
| 127 | 120 |
#PermitUserEnvironment no |
| 128 | 121 |
#Compression delayed |
| 129 | 122 |
#ClientAliveInterval 0 |
| ... | ... |
@@ -131,13 +124,20 @@ X11Forwarding yes |
| 131 | 124 |
#ShowPatchLevel no |
| 132 | 125 |
UseDNS no |
| 133 | 126 |
#PidFile /var/run/sshd.pid |
| 134 |
-#MaxStartups 10 |
|
| 127 |
+#MaxStartups 10:30:100 |
|
| 135 | 128 |
#PermitTunnel no |
| 136 | 129 |
#ChrootDirectory none |
| 130 |
+#VersionAddendum none |
|
| 137 | 131 |
|
| 138 | 132 |
# no default banner path |
| 139 | 133 |
#Banner none |
| 140 | 134 |
|
| 135 |
+# Accept locale-related environment variables |
|
| 136 |
+AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES |
|
| 137 |
+AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT |
|
| 138 |
+AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE |
|
| 139 |
+AcceptEnv XMODIFIERS |
|
| 140 |
+ |
|
| 141 | 141 |
# override default of no subsystems |
| 142 | 142 |
Subsystem sftp /usr/libexec/openssh/sftp-server |
| 143 | 143 |
|
| ... | ... |
@@ -145,9 +145,5 @@ Subsystem sftp /usr/libexec/openssh/sftp-server |
| 145 | 145 |
#Match User anoncvs |
| 146 | 146 |
# X11Forwarding no |
| 147 | 147 |
# AllowTcpForwarding no |
| 148 |
+# PermitTTY no |
|
| 148 | 149 |
# ForceCommand cvs server |
| 149 |
- |
|
| 150 |
-Ciphers aes256-ctr,aes192-ctr |
|
| 151 |
-MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,hmac-ripemd160@openssh.com |
|
| 152 |
-KexAlgorithms diffie-hellman-group-exchange-sha256 |
|
| 153 |
- |