Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 ...
share|improve this question
    
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. –  mtmiller May 6 at 10:43
1  
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 at 19:02

3 Answers 3

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    
share|improve this answer
    
Ubuntu 12.04 only upgrades up to openssh 5.9. launchpad.net/ubuntu/precise/+source/openssh –  Lisandro Jun 13 at 13:34
    
Already Editing my answer.. –  Yousef's Jun 13 at 13:37
    
@Lisandro Done Editing =) –  Yousef's Jun 13 at 13:45

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

share|improve this answer
    
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. –  Anuvrat Parashar Jul 29 at 9:54
    
Nope now it should be utopic –  Naveen Jul 29 at 11:37

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     
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.