openssh-server upgrade with adept fails in kubuntu 7.10

Asked by Alvin Larson

After I installed Kubuntu 7.10, I had to install openssh-server with adept to get ssh to work. Now I upgraded using adept from the icon tray. When adept tried to upgrade openssh-server, it ran into a big problem and I couldn's use adept any more. I did a clean up with apt-get following directions from news groups, etc. and got adept working again. I uninstalled the corrupted openssh-server, but haven't been able to install it with adept. When I try to install openssh-server with apt-get, I get the following error messages:

arl@cledus-b:~/rdcm/PhysNotes$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  ssh-askpass rssh molly-guard
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/269kB of archives.
After unpacking 705kB of additional disk space will be used.
Preconfiguring packages ...
openssh-server template parse error: Template #4 in /tmp/openssh-server.template.65570 has a duplicate field "template" with new value "ssh/vulnerable_host_keys". Probably two templates are not properly separated by a lone newline.

(Reading database ... 118968 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a4.6p1-5ubuntu0.3_amd64.deb) ...
Template #4 in /var/lib/dpkg/ has a duplicate field "template" with new value " ssh/vulnerable_host_keys". Probably two templates are not properly separated by a lone newline.
dpkg: error processing /var/cache/apt/archives/openssh-server_1%3a4.6p1-5ubuntu0.3_amd64.deb (- -unpack):
 subprocess pre-installation script returned error exit status 255
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Help will be greatly appreciated,

Al Larson

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Solved by:
Neil Woolford
Last query:
Last reply:
Revision history for this message
Best Neil Woolford (neil-neilwoolford) said :

I had this too, earlier today when updating an existing Ubuntu 7.10 (Gutsy) 32 bit setup.

It appears to me to actually be a fault in the package, which has now (13th May 2008, 21:20 UTC) been updated again and and installed correctly when forced.

The update does mess up existing keys, as it is a security update to the key generation method itself, so users of existing systems will have some misery updating keys to allow SSH connections (and NX, which relies on SSH) as the keys will have changed.

Hope this helps.


Revision history for this message
qiMakur (qimakur) said :

What, specifically, did you do to fix the issue? I've tried getting apt to reinstall the package and it still pukes with the same error as above.

Revision history for this message
Neil Woolford (neil-neilwoolford) said :

Specifically (looking at the command history, I didn't take notes) all I did was;

sudo apt-get update This did all the normal getting of package information.

sudo apt-get upgrade This threw an error message, suggesting the next step.

sudo apt-get -f install

There were messages about new keys being generated.

After that all was sorted. I just followed the instructions on the screen. I did need to update and upgrade before the install stage. If what I think about a package problem is correct, it may take a while for the corrected/updated package to get to all the mirrors.

I'm now trying to find the broken/changed key that is stopping the NX server working on that machine...


Revision history for this message
Neil Woolford (neil-neilwoolford) said :

To answer my side question about getting the NX server to work, it looks like deleting the stale /usr/NX/home/nx/.ssh/known_hosts file *on the server* (that is to say the remote machine) forces regeneration and then the system works again.


Revision history for this message
qiMakur (qimakur) said :


Thanks, you rock! That worked. I'd tried everything but the 'apt-get update'; oops.

Revision history for this message
Alvin Larson (alvinlarson) said :

Thanks Neil Woolford, that solved my question.