LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 03-19-2012, 01:34 PM   #1
hussainv1
LQ Newbie
 
Registered: Dec 2010
Posts: 9

Rep: Reputation: 0
ssh: connect to host localhost port 22: Connection refused


Hello folks,

I'm installing Apache Hadoop on Ubuntu 11.10 following this tutorial http://www.michael-noll.com/tutorial...-node-cluster/

But when i run this command "ssh localhost" in the terminal, i get the following message ssh: connect to host localhost port 22: Connection refused

I tried all the possible solutions in the article, but not much success.

hduser@hussain:~$ ssh -vvv localhost
OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused



Please help me as i'm stuck with this here.

Thank you,

Warm Regards,
Hussain
 
Old 03-19-2012, 01:36 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Verify your firewall.
make sure the ssh daemon is running.

kind regards
 
Old 03-19-2012, 01:44 PM   #3
hussainv1
LQ Newbie
 
Registered: Dec 2010
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Verify your firewall.
make sure the ssh daemon is running.

kind regards
Hi, thanx for ur reply. I'm not much familiar with linux environment.
Please tell me how to check firewell? should it be enabled or disabled?

I ran the below command to check for deamon process...is this right?

hduser@hussain:~$ ps aux | grep ssh
hussain 1319 0.0 0.0 3856 168 ? Ss Mar19 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /usr/bin/gnome-session --session=ubuntu
hduser 24755 0.0 0.0 4200 752 pts/1 S+ 00:11 0:00 grep --color=auto ssh


Warm Regards,
Hussain
 
Old 03-19-2012, 01:48 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
You need to start or install the shh daemon.
Code:
sudo apt-get install openssh-server
Kind regards
 
Old 03-19-2012, 01:53 PM   #5
hussainv1
LQ Newbie
 
Registered: Dec 2010
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
You need to start or install the shh daemon.
Code:
sudo apt-get install openssh-server
Kind regards
Thanks a lot buddy, it just worked great. You made my day

Warm Regards,
Hussain
 
Old 03-21-2012, 02:21 PM   #6
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
I recommend changing your port number. If you leave port 22 exposed to the internet, you will (eventually) see hundreds to thousands of connection attempts each day as various kiddies around the world will be trying to play password guessing games. You may have a very secure unguessable password, but the attempts WILL flood your logs, preventing you from easily spotting things you should actually be concerned about.

Once changed, you can then use the -p option on ssh, or the -P option on scp, to specify the port to connect to. Or better yet, code it into the ~/.ssh/config file.

I'm not telling what port number I'm using. But it does not have "22" in it.
 
Old 05-30-2013, 05:30 PM   #7
Nathesh
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
[QUOTE=Skaperen;4632845]I recommend changing your port number. If you leave port 22 exposed to the internet, you will (eventually) see hundreds to thousands of connection attempts each day as various kiddies around the world will be trying to play password guessing games. You may have a very secure unguessable password, but the attempts WILL flood your logs, preventing you from easily spotting things you should actually be concerned about.

Once changed, you can then use the -p option on ssh, or the -P option on scp, to specify the port to connect to. Or better yet, code it into the ~/.ssh/config file.



I had a question about this. I am sshing to a localhost.{ssh localhost} Does this mean I am connecting to my own computer using a ssh? Then why would I be worried about someone accessing my computer?
This is for creating HDFS. What I wanted to created virtual machines, which would act as namenode and data another for data node? How would I proceed with this?

Any help would be great!
 
  


Reply



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
ssh: connect to host 10.137.216.170 port 22: Connection refused bijaya.kumar Linux - Networking 5 02-14-2012 04:39 PM
ssh: connect to host port 22: Connection timed out shogun1234 Linux - Networking 1 06-21-2011 12:07 PM
ssh: connect to host XXXX port 22: Connection timed out jv2112 Linux - Newbie 3 07-04-2010 04:42 PM
ssh:connect to host restart port 22: Connection refused myubuntu Linux - Software 20 02-22-2010 11:32 PM
ssh: connect to host thyme1 port 22: Connection timed out - solved abstom Linux - Server 1 09-19-2009 05:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:29 AM.

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