Ubuntu: Not able to configure SSH in Ubuntu 14.04 LTS



Question:

I downloaded and installed Ubuntu 14.04 LTS on my VM and found that SSH was not working. Tried following but nothing worked:

sudo apt-get install ssh  

I see only openssh_client installed, I don't see openssh_server not installed.

Can you help me to install openssh_client, i tried sudo apt-get install openssh-server this gave following error:

Package openssh-server is not available, but is referred to by another package.  This may mean that the package is missing, has been obsoleted, or is only available from another source    E: Package 'openssh-server' has no installation candidate"  


Solution:1

I had the same problem it worked by following steps

  1. sudo apt-get remove openssh-client
  2. sudo apt-get update
  3. sudo apt-get install openssh-server.

Some may think that removing ssh client will break everything, which is not true. It only removes ssh client app.

ssh issue appear to be there in all Ubuntu 14 Desktop versions, and this appear to be the easiest solution.


Solution:2

This can happen if:

  1. your 'main' repo URL for apt is incorrect or out of date
  2. hypothetically, you somehow dumped the apt cache and cannot reach your 'main' repo (I've had trouble getting to a valid repo when I have DNS or other network issues)
  3. you do not have a 'main' repo URL (my problem today)

#3 seems far fetched to me, yet this is what brought me here - the result of Dell's bizarre decision to omit any of the base sources from its factory-shipped Ubuntu 14.04 installation (a Laptop I received yesterday).

I do not yet have the best solution to the problem since meddling with sources may cause interactions of the sources you add with the sources you already have - Dell OEM sources in my case - but an initial step that can get you up and running is to make sure you have a working 'main' repo, which might look something like this and should be located either in /etc/apt/sources.list or in one of the files in /etc/apt/sources.d/:

###### Ubuntu Main Repos  deb http://us.archive.ubuntu.com/ubuntu/ trusty main   

Note that the recommended URL will vary based on both your version and your location, so I typically use a tool such as repogen to generate it: https://repogen.simplylinux.ch/generate.php


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »