LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2010, 05:29 PM   #1
sllinux
Member
 
Registered: Feb 2009
Posts: 31

Rep: Reputation: 15
How to install SSH server on Ubuntu?


I just installed Ubuntu 9.10 on a machine here. Tried to SSH to it and failed. Tried to "ssh localhost" from the machine itself and that failed. Did a quick google search and found out that an SSH server is not installed by default.

But how do I install it?

I tried the following, which failed:

Code:
sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
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
I also clicked on a link with address aptpenssh-server in Firefox, which tried to open it with apturl, but then I got an error that said "Package 'openssh-server' is virtual".
 
Old 02-15-2010, 05:37 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
did you update your sources first?

If so, and it still doesn't work, post the contents of sources.list and "apt-cache policy openssh-server"
 
Old 02-15-2010, 05:38 PM   #3
sllinux
Member
 
Registered: Feb 2009
Posts: 31

Original Poster
Rep: Reputation: 15
I'm not sure what you mean by "update your sources first".
 
Old 02-15-2010, 05:38 PM   #4
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: Arch x86_64
Posts: 650

Rep: Reputation: 78
I'm not real familiar with apt. can you do searches? if not, I know you can search with synaptic package manager. You might just do a search for ssh and see what it turns up. you may be inputting the package wrong.
 
Old 02-15-2010, 05:42 PM   #5
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
I mean "apt-get update".
 
Old 02-15-2010, 06:23 PM   #6
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Basic apt tutorial.

Apt looks at your sources.list file to find the download servers for all software to install. Package managers such as synaptic also look at your sources.list file. This file is located at /etc/apt/sources.list. Apt is a very useful and powerful tool that is very easy to use. Synaptic is a GUI interface available in the gnome desktop environment to control apt. Adversely Kpackage does the same thing in the KDE desktop environment.

If you want to search for a package you can use apt-cache
Code:
apt-cache search <package name>
To install a package use apt-get install
Code:
apt-get install <package name>
To Remove a package use apt-get remove
Code:
apt-get remove <package name>
When removing software in some files such as configurations are not always removed. To completely remove a package use the purge switch
Code:
apt-get remove --purge <package name>
To fix broken packages use the force option with install
Code:
apt-get -f install
*** Note there was not a package name specified here. This is intentional.

To perform a system update use apt-get upgrade
Code:
apt-get upgrade
To perform a distribution upgrade use apt-get dist-upgrade
Code:
apt-get dist-upgrade
To re-load your sources.list file use apt-get update
Code:
apt-get update

using the above information you should be able to do almost anything related to package management on your system.
 
Old 02-15-2010, 06:24 PM   #7
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Also can you post the contents of /etc/apt/sources.list?
 
Old 02-15-2010, 06:29 PM   #8
sllinux
Member
 
Registered: Feb 2009
Posts: 31

Original Poster
Rep: Reputation: 15
Thank you everyone. I did the "sudo apt-get update" (took a while), and then the "sudo apt-get install openssh-server" worked!
 
Old 02-15-2010, 06:29 PM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
Always update your sources before performing any package installs or upgrades.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow ssh connection over lan with Ubuntu Desktop and Ubuntu Server Recursion Linux - Networking 1 05-23-2009 03:17 AM
SSH not working from other ubuntu server, but from windows? SimbaSpirit Linux - Software 11 07-03-2008 07:06 PM
Server id has changed on ubuntu 7.10 so unable to ssh in ... curtisa Linux - Security 3 05-15-2008 07:06 AM
Ubuntu Server GUI Via SSH - Possible??? abc27 Linux - Newbie 22 04-23-2008 03:10 PM
Ubuntu 6.06 Server(SSH Setup/Putty) TechMansoor Linux - Networking 1 12-16-2006 10:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration