diff options
Diffstat (limited to 'debian/openssh-server.postinst')
-rw-r--r-- | debian/openssh-server.postinst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst index 02d01f2d8..ef1412ca7 100644 --- a/debian/openssh-server.postinst +++ b/debian/openssh-server.postinst | |||
@@ -26,11 +26,13 @@ check_idea_key() { | |||
26 | # check for old host_key files using IDEA, which openssh does not | 26 | # check for old host_key files using IDEA, which openssh does not |
27 | # support | 27 | # support |
28 | if [ -f /etc/ssh/ssh_host_key ] ; then | 28 | if [ -f /etc/ssh/ssh_host_key ] ; then |
29 | if ssh-keygen -p -N '' -f /etc/ssh/ssh_host_key 2>&1 | \ | 29 | cp -a /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.check_idea |
30 | if ssh-keygen -p -N '' -f /etc/ssh/ssh_host_key.check_idea 2>&1 | \ | ||
30 | grep -q 'unknown cipher' 2>/dev/null; then | 31 | grep -q 'unknown cipher' 2>/dev/null; then |
31 | mv /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.old | 32 | mv /etc/ssh/ssh_host_key /etc/ssh/ssh_host_key.old |
32 | mv /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_key.pub.old | 33 | mv /etc/ssh/ssh_host_key.pub /etc/ssh/ssh_host_key.pub.old |
33 | fi | 34 | fi |
35 | rm -f /etc/ssh/ssh_host_key.check_idea | ||
34 | fi | 36 | fi |
35 | } | 37 | } |
36 | 38 | ||