diff options
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 2c6c53d88..45121534d 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -79,18 +79,11 @@ host_keys_required() { | |||
79 | echo "$hostkeys" | 79 | echo "$hostkeys" |
80 | else | 80 | else |
81 | # No HostKey directives at all, so the server picks some | 81 | # No HostKey directives at all, so the server picks some |
82 | # defaults depending on the setting of Protocol. | 82 | # defaults. |
83 | protocol="$(get_config_option Protocol)" | 83 | echo /etc/ssh/ssh_host_rsa_key |
84 | [ "$protocol" ] || protocol=1,2 | 84 | echo /etc/ssh/ssh_host_dsa_key |
85 | if echo "$protocol" | grep 1 >/dev/null; then | 85 | echo /etc/ssh/ssh_host_ecdsa_key |
86 | echo /etc/ssh/ssh_host_key | 86 | echo /etc/ssh/ssh_host_ed25519_key |
87 | fi | ||
88 | if echo "$protocol" | grep 2 >/dev/null; then | ||
89 | echo /etc/ssh/ssh_host_rsa_key | ||
90 | echo /etc/ssh/ssh_host_dsa_key | ||
91 | echo /etc/ssh/ssh_host_ecdsa_key | ||
92 | echo /etc/ssh/ssh_host_ed25519_key | ||
93 | fi | ||
94 | fi | 87 | fi |
95 | } | 88 | } |
96 | 89 | ||
@@ -119,9 +112,6 @@ create_key() { | |||
119 | create_keys() { | 112 | create_keys() { |
120 | hostkeys="$(host_keys_required)" | 113 | hostkeys="$(host_keys_required)" |
121 | 114 | ||
122 | create_key "Creating SSH1 key; this may take some time ..." \ | ||
123 | "$hostkeys" /etc/ssh/ssh_host_key -t rsa1 | ||
124 | |||
125 | create_key "Creating SSH2 RSA key; this may take some time ..." \ | 115 | create_key "Creating SSH2 RSA key; this may take some time ..." \ |
126 | "$hostkeys" /etc/ssh/ssh_host_rsa_key -t rsa | 116 | "$hostkeys" /etc/ssh/ssh_host_rsa_key -t rsa |
127 | create_key "Creating SSH2 DSA key; this may take some time ..." \ | 117 | create_key "Creating SSH2 DSA key; this may take some time ..." \ |