summaryrefslogtreecommitdiff
path: root/debian/openssh-server.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r--debian/openssh-server.postinst15
1 files changed, 14 insertions, 1 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index 24d9a2c93..54dbe13a2 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -131,6 +131,13 @@ fix_loglevel_silent() {
131} 131}
132 132
133 133
134update_server_key_bits() {
135 if [ "$(get_config_option ServerKeyBits)" = 768 ]; then
136 set_config_option ServerKeyBits 1024
137 fi
138}
139
140
134create_sshdconfig() { 141create_sshdconfig() {
135 if [ -e /etc/ssh/sshd_config ] ; then 142 if [ -e /etc/ssh/sshd_config ] ; then
136 # Upgrade an existing sshd configuration. 143 # Upgrade an existing sshd configuration.
@@ -146,6 +153,12 @@ create_sshdconfig() {
146 fix_loglevel_silent 153 fix_loglevel_silent
147 fi 154 fi
148 155
156 # Changed upstream in 5.1p1, but we forgot to update the
157 # package-generated configuration file until now.
158 if dpkg --compare-versions "$oldversion" lt 1:6.4p1-2; then
159 update_server_key_bits
160 fi
161
149 return 0 162 return 0
150 fi 163 fi
151 164
@@ -168,7 +181,7 @@ UsePrivilegeSeparation yes
168 181
169# Lifetime and size of ephemeral version 1 server key 182# Lifetime and size of ephemeral version 1 server key
170KeyRegenerationInterval 3600 183KeyRegenerationInterval 3600
171ServerKeyBits 768 184ServerKeyBits 1024
172 185
173# Logging 186# Logging
174SyslogFacility AUTH 187SyslogFacility AUTH