LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to ssh into newly installed system??? (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-ssh-into-newly-installed-system-605174/)

ajeetraina 12-07-2007 07:32 AM

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??

dyasny 12-07-2007 07:39 AM

what does nmap show?

ajeetraina 12-07-2007 08:51 AM

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????

matthewg42 12-07-2007 08:54 AM

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).

matthewg42 12-07-2007 08:55 AM

By the way, the package is called openssh-server

ajeetraina 12-07-2007 11:14 PM

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

Slokunshialgo 12-07-2007 11:35 PM

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.

ajeetraina 12-08-2007 04:14 AM

I can only use wget to downlaod the openssh-server.Can anyone help me to download?Other options are not working??

matthewg42 12-08-2007 04:29 AM

Quote:

Originally Posted by ajeetraina (Post 2983773)
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.

mrrangerman 12-08-2007 06:12 AM

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.

matthewg42 12-08-2007 06:20 AM

Quote:

Originally Posted by mrrangerman (Post 2983928)
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.

mrrangerman 12-08-2007 07:39 AM

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.


All times are GMT -5. The time now is 03:23 AM.