LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-07-2007, 08:32 AM   #1
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Rep: Reputation: 30
Unable to ssh into newly installed system???


I am not able to ssh from the remote windows machine into a newly installed UBUNTU gutsy machine.I can ping and ssh from the Ubuntu machine to Windows and other linux machines but couldn't ssh from any remote machine.I disable the firwall for port 22 but it dint work.

Any idea??
 
Old 12-07-2007, 08:39 AM   #2
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
what does nmap show?
 
Old 12-07-2007, 09:51 AM   #3
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
I am not able to see nmap output since the command is not there but to my surprise I am finding that #ssh localhost is itself not working....I just installed the OS and unable to ssh...I think I have not formatted the previous OS may be and I may be providing the same IP..Can it be possible?Totally confused?????Plzz ANyone I need quick help..as my project will be ruined????
 
Old 12-07-2007, 09:54 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Ubuntu does not come with an ssh service enabled by default. You have to install sshd (the ssh client is a separate package from the server).
 
Old 12-07-2007, 09:55 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
By the way, the package is called openssh-server
 
Old 12-08-2007, 12:14 AM   #6
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
Dude...ssh package is there...I can ssh to remote machine but when I am trying to ssh from remote windows or linux machine its not working
 
Old 12-08-2007, 12:35 AM   #7
Slokunshialgo
Member
 
Registered: Jan 2006
Distribution: Ubuntu 9.04, Fedora 10
Posts: 76

Rep: Reputation: 17
ajeetraina, there are 2 things for SSH. There's SSH for the shell (which would allow you to go from your box to another), which is always installed. Then, you have the SSH Daemon. The latter being what you need. What this does, is it listens to a port (I believe 22, but I'm likely wrong) for any SSH requests coming in, and allows them to connect. When you go into bash, and type "ssh <server>", you are using the SSH client to connect to the SSH daemon running on the remote server.

To explain it another way, since that sounded a bit convoluted to me...

In bash, when you SSH to another machine, you are using the ssh client. The server you are connecting to is an ssh server. it is able to be one as it has the SSH daemon installed and running. For a more familiar example, firefox and a web server. Firefox is a client (ssh from bash), which connects you to a server, which is running Apache (ssh server daemon). If you have Firefox installed on a computer, you don't automatically have the ability to use another firefox browser to connect to it and see pages.

So, with Ubuntu's default configuration, you have ssh-client installed, to be used from within bash (think of the Firefox example). To allow for connections, you need to have openssh-server installed (as you would need Apache installed). the easiest way of doing this is to run sudo apt-get install openssh-server. I hope the explanation helped, and you didn't just jump to the quick answer.
 
Old 12-08-2007, 05:14 AM   #8
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Original Poster
Rep: Reputation: 30
I can only use wget to downlaod the openssh-server.Can anyone help me to download?Other options are not working??
 
Old 12-08-2007, 05:29 AM   #9
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Quote:
Originally Posted by ajeetraina View Post
Dude...ssh package is there...I can ssh to remote machine but when I am trying to ssh from remote windows or linux machine its not working
But do you just have the client part installed? If so, what you describe is exactly that I expect, You have to install the server part too. With ssh:

client = outgoing connections
server = incoming connections

Open a terminal and enter this command:
Code:
aptitude search openssh
The output will probably look like this:
Code:
i   openssh-client  - secure shell client, an rlogin/rsh/rcp replacement
p   openssh-server  - secure shell server, an rshd replacement
Note the i and p character that the start of the line. The i means installed. The p means not installed. If you see p before the openssh-server line this means it is not installed. You have to install it before you can connect to the machine from other machines using ssh.

So install openssh-server. You can use synaptic to do this is you like GUIs, else you can use apt-get or aptitude if you prefer the command line.
 
Old 12-08-2007, 07:12 AM   #10
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Yep I've had the same thing happen on two different fresh installs, had to install the server side of ssh so fallow matthewg42 suggestions and you should be good to go.
 
Old 12-08-2007, 07:20 AM   #11
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 67
Quote:
Originally Posted by mrrangerman View Post
Yep I've had the same thing happen on two different fresh installs,
You seem to be suggesting that you think it should be installed by default, and that it is not is somehow an error. This is incorrect. The server side is not part of the default Ubuntu installation.
 
Old 12-08-2007, 08:39 AM   #12
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 59
Quote:
matthewg42

You seem to be suggesting that you think it should be installed by default, and that it is not is somehow an error. This is incorrect.
No not at all, it makes perfect sense not to install the server side with a fresh install for security reasons.

I hadn't used ssh much to speak of until about a year ago, that's when I discovered the server side needed to be installed also. I should have made myself a little more clear when I posted. Anyway, I wanted to let ajeetraina know that his/her experience is not unique and that your reply would fix their problem.
 
  


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
Cannot boot already installed ubuntu on newly installed win xp abhi_337 Ubuntu 1 07-13-2006 04:33 AM
Change system to use newly installed version of firefox Syncman9 Linux - Newbie 5 07-15-2005 07:11 PM
Where are my newly installed programs glen4cindy Mandriva 4 03-28-2005 12:46 PM
ubuntu - newly installed Steph00 Linux - Newbie 0 10-26-2004 09:27 PM
Newly installed slackware system will not boot yelo Slackware - Installation 5 05-11-2004 07:01 AM

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

All times are GMT -5. The time now is 03:15 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
Open Source Consulting | Domain Registration