3

I'm having hard time updating openssh-server in ubuntu 12.04, I stupidly downloaded .deb file for 14.04 and of course it didn't work :/

I've tried sudo apt-get -f install, it just removed my openssh

Here's the output installing openssh 6.6

vagrant@precise64:~$ sudo dpkg -i openssh-server_6.6p1-2ubuntu1_amd64.deb 
Selecting previously unselected package openssh-server.
(Reading database ... 84054 files and directories currently installed.)
Unpacking openssh-server (from openssh-server_6.6p1-2ubuntu1_amd64.deb) ...
dpkg: dependency problems prevent configuration of openssh-server:
 openssh-server depends on libc6 (>= 2.17); however:
  Version of libc6 on system is 2.15-0ubuntu10.5.
 openssh-server depends on libck-connector0 (>= 0.2.1); however:
  Package libck-connector0 is not installed.
 openssh-server depends on init-system-helpers (>= 1.13~); however:
  Package init-system-helpers is not installed.
 openssh-server depends on openssh-client (= 1:6.6p1-2ubuntu1); however:
  Version of openssh-client on system is 1:5.9p1-5ubuntu1.3.
 openssh-server depends on sysv-rc (>= 2.88dsf-24) | file-rc (>= 0.8.16); however:
  Version of sysv-rc on system is 2.88dsf-13.10ubuntu11.1.
  Package file-rc is not installed.
 openssh-server depends on lsb-base (>= 4.1+Debian3); however:
  Version of lsb-base on system is 4.0-0ubuntu20.3.
 openssh-server depends on openssh-sftp-server; however:
  Package openssh-sftp-server is not installed.
dpkg: error processing openssh-server (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
2
  • Can you explain why you are trying to update OpenSSH or which version you expect to be able to update to? It looks to me like you already have the latest version available for 12.04, so no update will be possible using apt-get. May 6, 2014 at 10:43
  • 5
    He is probably trying to upgrade due to a security risk associated to pre openssh 6.6 versions. Ubuntu 12.04 only upgrades to 5.9 and leaves the server Non PCI compliant. Did you ever find a solution for this Darick?
    – Lisandro
    Jun 12, 2014 at 19:02

4 Answers 4

2

The Code you Input:

sudo dpkg -i openssh-server_6.6p1-2ubuntu1_amd64.deb

Should install the OpenSSH-Server and not Remove it. Anyway, If you want to install it the Correct way, Open Up a Terminal Using Ctrl+Alt+T and Type:

sudo apt-get install openssh-server    

and it will install The OpenSSH-Server, and if it already Installed, It Will Update it and if it's up to date then nothing will be done, Also, If You have trouble with the Command Above Try:

sudo apt-get update    

And As listed above, Ubuntu Upgrade OpenSSH-Server to an Older Version than the Latest, So To Install the Latest, First we need to remove any existing old OpenSSH-Server, Bring up a Command Prompt Using Ctrl+Alt+T and Type the Following, Pressing Enter after Each Line:

sudo apt-get remove openssh-server    

and Then to Install the latest

wget http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/openssh-6.6p1.tar.gz    

tar -xvf openssh-6.6p1.tar.gz    

cd openssh-6.6p1    

./configure --prefix=/usr --sysconfdir=/etc/ssh    

--with-md5-passwords --with-privsep-path=/var/lib/sshd    

sudo make install    

And you should now Have OpenSSH-Server 6.6 P1, To Check, Type in a Terminal:

sshd -V    
3
1

This is not the original solution but a workaround to get the latest openssh-server on Ubuntu. Execute these lines in your Terminal:

sudo echo "deb http://archive.ubuntu.com/ubuntu utopic security universe" >> /etc/apt/sources.list

sudo apt-get update

sudo apt-get install openssh-server=1:6.6p1-2ubuntu1

3
  • are you sure you don't mean sudo echo "deb archive.ubuntu.com/ubuntu trusty-security universe" >> /etc/apt/sources.list ?? and this line is already present in the file. Jul 29, 2014 at 9:54
  • Nope now it should be utopic
    – Naveen
    Jul 29, 2014 at 11:37
  • For people who still run 12.10 and want to upgrade openssh: deb http://old-releases.ubuntu.com/ubuntu utopic main universe
    – Fabio A.
    Oct 27, 2017 at 16:32
1

Since I cannot comment, I ran into some issues with this, same as above but with some extra steps to prevent getting locked out.

Same steps as above:

wget http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/openssh-6.6p1.tar.gz    

tar -xvf openssh-6.6p1.tar.gz    

cd openssh-6.6p1    

./configure --prefix=/usr --sysconfdir=/etc/ssh    

--with-md5-passwords --with-privsep-path=/var/lib/sshd    

sudo make install    

Then make sure you restart ssh!

sudo service ssh start

Unlock and set to a random password (you will still get .pem passwordless access)

sudo passwd -u ubuntu       
sudo passwd    ubuntu     
0

I wanted to use the latest OpenSSL (1.0.2a) so I had to build that first (Upgrade OpenSSL on Ubuntu 12.04). Then I had to help the OpenSSH figure out where my local ssl source was located (--with-ssl-dir=/usr/local/ssl).

./configure --prefix=/usr --sysconfdir=/etc/ssh --with-md5-passwords 
--with-privsep-path=/var/lib/sshd --with-ssl=/usr/local/ssl/lib 
--with-ssl-dir=/usr/local/ssl

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .