LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-13-2010, 12:46 PM   #1
pgte3
Member
 
Registered: Aug 2004
Posts: 62

Rep: Reputation: 15
SSH connection refused


I installed debian 5.0 (AMD64).

Installed the ssh package:

# apt-get update
# apt-get install ssh

Rebooted the server.

See sshd running via ps -A

Get a connection refused message when trying to connect via putty (going to the correct ip and port(22)).

Also, I am able to ping the ip address of the server successfully, and I am not able to ssh to it from another debian server I have up and running on the same network.

Any ideas what I am doing wrong?

Last edited by pgte3; 10-13-2010 at 01:36 PM.
 
Old 10-13-2010, 01:34 PM   #2
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 177
Blog Entries: 166

Rep: Reputation: 21
Quote:
Originally Posted by pgte3 View Post
I installed debian 5.0 (AMD64).

Installed the ssh package:

# apt-get update
# apt-get install ssh

Rebooted the server.

See sshd running via ps -A

Get a connection refused message when trying to connect via putty (going to the correct ip and port(22)).

Any ideas what I am doing wrong?
Try installing openssh-server on the host machine.
 
Old 10-13-2010, 01:53 PM   #3
pgte3
Member
 
Registered: Aug 2004
Posts: 62

Original Poster
Rep: Reputation: 15
I think that intalling the ssh (meta) package, installs both the openssh-server and openssh-client packages.
 
Old 10-13-2010, 01:57 PM   #4
pgte3
Member
 
Registered: Aug 2004
Posts: 62

Original Poster
Rep: Reputation: 15
I did notice that on my working (can ssh to it) debian 5.0 (i386) server that sshd appears 3 times when doing a ps -A

sshd only appears once on the server I can not connect to, I do not know if this is releated to my problem
 
Old 10-13-2010, 04:08 PM   #5
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Each time you succesfully connect by ssh, the server create a new instance, so 3 times means 2 currently connected sessions and server waiting for next. And 1 means running server and no connections. Please run your server in debug mode by
Code:
service ssh stop
/usr/sbin/sshd -ddd
And try connect to it. You should see in system log entries about sshd, so post them here.
 
Old 10-13-2010, 07:40 PM   #6
pgte3
Member
 
Registered: Aug 2004
Posts: 62

Original Poster
Rep: Reputation: 15
ssh connection now working. Not a issue with linux. I looked on my router and my server was not showing up in the DHCP list as well as other servers (including servers that I could connect to). I rebooted my router and my servers. DHCP list now looks corrrect and all connections now are working.

I sure there is a slicker way then the "reboot" to correct this DHCP issue.
 
Old 10-14-2010, 03:53 AM   #7
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 177
Blog Entries: 166

Rep: Reputation: 21
it is always the little things. Normally for servers I use a static ip with and edited resolv.conf. If you had the correct ip address, what the dhcp server has, should not make a difference unless the server had not requested an ip yet.
 
Old 10-14-2010, 04:15 AM   #8
aries_baluyot
Member
 
Registered: Oct 2010
Location: India
Distribution: Mandriva, Suse, Ubuntu, Centos, Maemo, Omnia Xp
Posts: 86

Rep: Reputation: -11
Quote:
Originally Posted by pgte3 View Post
I installed debian 5.0 (AMD64).

Installed the ssh package:

# apt-get update
# apt-get install ssh

Rebooted the server.

See sshd running via ps -A

Get a connection refused message when trying to connect via putty (going to the correct ip and port(22)).

Also, I am able to ping the ip address of the server successfully, and I am not able to ssh to it from another debian server I have up and running on the same network.

Any ideas what I am doing wrong?

i think you dont need to install ssh server
im using linux mandriva
and i dont install ssh all i just to do is run the ssh in system menu
it is in the mandriva control panel
 
Old 10-14-2010, 06:41 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,336

Rep: Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895
Quote:
Originally Posted by aries_baluyot View Post
i think you dont need to install ssh server
im using linux mandriva
and i dont install ssh all i just to do is run the ssh in system menu
it is in the mandriva control panel
Great..except the OP isn't using Mandriva.
 
Old 10-15-2010, 04:00 AM   #10
aries_baluyot
Member
 
Registered: Oct 2010
Location: India
Distribution: Mandriva, Suse, Ubuntu, Centos, Maemo, Omnia Xp
Posts: 86

Rep: Reputation: -11
Quote:
Originally Posted by TB0ne View Post
Great..except the OP isn't using Mandriva.
yeah i know

now i suggested to used mandriva

it is good

KDE or GNOME

Linux
is good
Mandriva is the best
 
0 members found this post helpful.
Old 10-15-2010, 08:30 AM   #11
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,336

Rep: Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895Reputation: 3895
Quote:
Originally Posted by aries_baluyot View Post
yeah i know

now i suggested to used mandriva it is good
KDE or GNOME
Linux is good Mandriva is the best
So you're seriously suggesting that someone format their hard drive, and reload an ENTIRE operating system, just to get one service working?? Something that wasn't even a problem with Linux, but with the router??
 
Old 10-15-2010, 08:32 AM   #12
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Exclamation

Quote:
Originally Posted by pgte3 View Post
ssh connection now working. Not a issue with linux. I looked on my router and my server was not showing up in the DHCP list as well as other servers (including servers that I could connect to). I rebooted my router and my servers. DHCP list now looks corrrect and all connections now are working.

I sure there is a slicker way then the "reboot" to correct this DHCP issue.
I'd guess taking your network interface down, and bringing it back up might get it to repull the IP and so get reinserted into the DHCP table.

Depending on distro:

Code:
ifdown eth0
ifup eth0
Change eth0 for the name of the interface your restarting
 
Old 10-15-2010, 08:37 AM   #13
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
Exclamation

Quote:
Originally Posted by eSelix View Post
Each time you succesfully connect by ssh, the server create a new instance, so 3 times means 2 currently connected sessions and server waiting for next. And 1 means running server and no connections. Please run your server in debug mode by
Code:
service ssh stop
/usr/sbin/sshd -ddd
And try connect to it. You should see in system log entries about sshd, so post them here.
Does `ps` not create a process?

try
Code:
ps aux | grep sshd
and you'll notice that it'll also show the grep process running... I dont know if the ps counts as a process or not. But it is something to be aware of!.
 
Old 10-15-2010, 02:15 PM   #14
pgte3
Member
 
Registered: Aug 2004
Posts: 62

Original Poster
Rep: Reputation: 15
Thanks djsmiley2k, I will keep that in mind in the future. I am not to hip on networking DHCP stuff.
 
Old 10-15-2010, 02:41 PM   #15
Stephannn
Member
 
Registered: Oct 2010
Location: San Francisco, CA
Distribution: Snow Leopard, Ubuntu, RedHat
Posts: 64

Rep: Reputation: 14
Quote:
Originally Posted by djsmiley2k View Post
I'd guess taking your network interface down, and bringing it back up might get it to repull the IP and so get reinserted into the DHCP table.
dhclient does the trick. If your network connection is eth0, you'd:

Code:
[root@localhost ~]# dhclient eth0
 
  


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 06:43 AM
ssh connection refused lee_elginlinux Linux - Networking 3 12-12-2007 08:03 AM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 05:38 PM
SSH connection refused bmccorm2 Linux - Networking 4 05-15-2007 03:59 PM
ssh connection refused rguptatx Red Hat 4 11-13-2003 07:18 PM


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