LinuxQuestions.org
Review your favorite Linux distribution.
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 01-30-2005, 12:26 AM   #1
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 458

Rep: Reputation: 30
sshd starting twice


I cant connect to sshd and when viewing my logs I see this error
auth.log
Jan 30 00:17:23 linux sshd[28463]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.

Since google is my friend I looked it up and found out that its probably the process starting twice. I removed the process and reinstalled, same result. I also tried changing the port to something crazy like 39321 just to make sure nothing else was using 22. Here are the results of some of my troubleshooting:

[root@linux log]# fuser -n tcp 22
22/tcp: 28463
[root@linux log]# ps -e |grep 28463
28463 ? 00:00:00 sshd
[root@linux log]# netstat -na |grep 2073
tcp 0 0 :::22 :::* LISTEN

Please let me know what you think.
The GNUbie
 
Old 01-30-2005, 09:05 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Do you have any firewall rules in place?
iptables -nL
 
Old 01-30-2005, 11:27 AM   #3
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 458

Original Poster
Rep: Reputation: 30
yes, I used to see the rejected packets in the logs but I added a rule and dont see it being rejected anymore. I can also telnet to the linux box from the LAN (XP machine) to the ssh port and it does get through (ie. the cmd prompt screen in xp goes blank)
and I now see these messages in /var/log/messages
Jan 30 11:30:04 linux sshd: refused connect from ::ffff:192.168.0.2 (::ffff:192.168.0.2)

if you still need to see iptables -nL I would be happy to post it, but its kinda lengthy (shorewall)

Last edited by ryedunn; 01-30-2005 at 11:31 AM.
 
Old 01-30-2005, 07:56 PM   #4
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 458

Original Poster
Rep: Reputation: 30
increased logging?

is there a way I can increase the loggin to help find out what the problem is?
 
Old 01-30-2005, 09:47 PM   #5
ryedunn
Member
 
Registered: Jul 2003
Location: Chicago
Distribution: Fedora, ubuntu
Posts: 458

Original Poster
Rep: Reputation: 30
okay much closer

I might be wrong but I think it was trying to start sshd for each nick card I have. So I went into my sshd_config file and specified the ListenAddress to my internet IP (Im not sure why this wasnt a problem before I reinstalled to 10.1)

next step... start sshd in debug mode, I posted the results below but I have no clue why its not connecting...

[root@linux ssh]# /usr/sbin/sshd -d
debug1: sshd version OpenSSH_3.9p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Bind to port 22 on xxx.xxx.xxx.xxx.
Server listening on xxx.xxx.xxx.xxx port 22.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7

next check /etc/hosts.allow
shd 192.168.0. [3ffe:ffff:100:200::]/64

ughhhh... )#*$#@$*&@!!! typo!!!
should have been:
sshd 192.168.0. [3ffe:ffff:100:200::]/64
granted I have no clue what the [3ffe:ffff:100:200::] part is for, but sshd:ALL works too.
 
  


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
starting sshd how to.. bruse Linux - Networking 5 04-22-2005 04:26 AM
freebsd halt at Starting sshd blackzone *BSD 3 01-31-2005 05:22 PM
sshd not starting up on boot after upgrade babis Linux - Software 1 03-18-2004 07:04 PM
Starting sshd: [ OK ] pk21 Linux - General 4 03-05-2003 04:27 PM
starting sshd on SuSE 7.0 glock19 Linux - General 2 05-02-2002 03:21 PM


All times are GMT -5. The time now is 02:47 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration