LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2008, 08:27 AM   #1
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Rep: Reputation: 32
ssh error connection refused


Hallo all,

Am having a problem with ssh running fedora 8. Now here's the output of ssh -vv

Code:
ssh -vvv vulture@172.20.16.247
OpenSSH_4.5p1, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.20.16.247 [172.20.16.247] port 22.
debug1: connect to address 172.20.16.247 port 22: Connection refused
ssh: connect to host 172.20.16.247 port 22: Connection refused

When i try and see if sshd is running i get this out put:

Code:
ps aux | grep sshd
29909  0.0  0.1   4044   664 pts/2    R+   16:22   0:00 grep sshd
which indicates that there's is no sshd daemon running. So i go ahead to reinstall openssh but there is no change.

My question is, could anyone have an idea of why there is no sshd daemon running yet i have installed the server and the client and two, why i cant connect TO my machine yet i can sshto another box from my box??

Also a scan of open ports indicate that port 22 is not present. I have enabled it in the firewall but it still wont show.


Thanks in advance.
 
Old 07-24-2008, 09:03 AM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK.

1) Installing a service does not automatically start the service. You will need to run "/etc/init.d/ssh start" to start it and "/sbin/chkconfig ssh on" to have it automatically start when you reboot your system.

2) Connecting TO a machine requires that machine to be running the ssh daemon. Connecting FROM a machine simply requires the client be installed on the system.

The scan of open ports indicates that 22 isn't open because you need to start the service.

HTH

Forrest
 
Old 07-24-2008, 09:05 AM   #3
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 997

Rep: Reputation: 130Reputation: 130
Mmmh, I didn't understand if you started up the server - e.g. "/etc/init.d/sshd start"?
 
Old 07-24-2008, 09:07 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 23,187

Rep: Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476Reputation: 6476
Quote:
Originally Posted by immortaltechnique View Post
Hallo all,

Am having a problem with ssh running fedora 8. Now here's the output of ssh -vv

Code:
ssh -vvv vulture@172.20.16.247
OpenSSH_4.5p1, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.20.16.247 [172.20.16.247] port 22.
debug1: connect to address 172.20.16.247 port 22: Connection refused
ssh: connect to host 172.20.16.247 port 22: Connection refused

When i try and see if sshd is running i get this out put:

Code:
ps aux | grep sshd
29909  0.0  0.1   4044   664 pts/2    R+   16:22   0:00 grep sshd
which indicates that there's is no sshd daemon running. So i go ahead to reinstall openssh but there is no change.

My question is, could anyone have an idea of why there is no sshd daemon running yet i have installed the server and the client and two, why i cant connect TO my machine yet i can sshto another box from my box??

Also a scan of open ports indicate that port 22 is not present. I have enabled it in the firewall but it still wont show.
Since SSHD isn't running, and SSHD is what opens port 22, then yes, it won't show as open, because it's not.

Installing SSHD is different than starting it. Have you tried to do /etc/init.d/sshd start (as root), to start the service? Or (as root), type in "<path to sshd>/sshd" at the command-line, and see what errors you get? Also, have you read the configuration instructions for /etc/ssh/sshd.conf, which you have to set up first, before you can fire up the daemon?

You can ssh out, because you're using the SSH client, not the server, to connect.
 
Old 07-25-2008, 02:52 AM   #5
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Original Poster
Rep: Reputation: 32
Hallo all, I realised that the sshd daemon was not runnning even after doing a /usr/sbin/ssh.

So i resulted in reinstalling it all over again and put a script in /etc/init.d/ which allowed me to start the service.


Thank you all for your input. If anyone else has a similar problem especially in the start-up script you can find it here
http://www.styma.org/SunAtHome/sample_files/sshd.html
 
  


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
SSH connection Refused gatesr494 Linux - Networking 5 01-05-2008 05:43 AM
ssh connection refused lee_elginlinux Linux - Networking 3 12-12-2007 07:03 AM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
ssh - connection refused Murdock1979 Linux - Networking 1 11-22-2006 11:21 PM
ssh connection refused - error with ncurses when loading sshd tai786 Linux - Software 1 01-29-2006 03:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:32 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