Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

sshd/bind problem [solved]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
klatk
n00b
n00b
Posts: 35
Joined: Fri Jun 25, 2004 7:53 pm

sshd/bind problem [solved]

  • Quote

Post by klatk » Wed Sep 14, 2005 7:01 pm

So after a recent reconfigure of my kernel to enable my USB mouse I've been unable to ssh in. After checking my logs I saw this bind error...
error: Bind to port 22 on 0.0.0.0 failed: Address already in use.


So my questions now are--

1. What could have happened so that something's already using that address? and how can I find out what that is?

2. Does sshd have to listen to 0.0.0.0 to work? Can it be set to something else with no problems or other change in behavior?

Thanks
Last edited by klatk on Sun Sep 18, 2005 2:52 am, edited 1 time in total.
Top
christsong84
Veteran
Veteran
User avatar
Posts: 1003
Joined: Sun Apr 06, 2003 10:04 pm
Location: GMT-8 (Spokane)

  • Quote

Post by christsong84 » Wed Sep 14, 2005 7:29 pm

It's probably best to set it to listen on a specific IP that you have instead of 0.0.0.0.

Is sshd already running? check your processes to make sure. :)
while(true) {self.input(sugar);} :twisted:
Top
klatk
n00b
n00b
Posts: 35
Joined: Fri Jun 25, 2004 7:53 pm

  • Quote

Post by klatk » Wed Sep 14, 2005 10:57 pm

I can change it to listen to another IP. The question then becomes, what specific IP should I be setting it to listen to, and for that matter, why is the default config 0.0.0.0?
Is sshd already running? check your processes to make sure.

If by that you mean that maybe I have more than one instance of sshd running, I don't know. I'll have to check. But that would be odd, wouldn't it?

Is there any way to find out via bind or something what's actually taking up that address?
Top
christsong84
Veteran
Veteran
User avatar
Posts: 1003
Joined: Sun Apr 06, 2003 10:04 pm
Location: GMT-8 (Spokane)

  • Quote

Post by christsong84 » Thu Sep 15, 2005 5:31 pm

klatk wrote:I can change it to listen to another IP. The question then becomes, what specific IP should I be setting it to listen to, and for that matter, why is the default config 0.0.0.0?
Is sshd already running? check your processes to make sure.

If by that you mean that maybe I have more than one instance of sshd running, I don't know. I'll have to check. But that would be odd, wouldn't it?

Is there any way to find out via bind or something what's actually taking up that address?
I believe 0.0.0.0 is to listen on any ip. Set it to the ip of your NIC. If it's been assigned via DHCP, run an ifconfig -a to find out the IP assigned to it.

It would be odd for more than one instance to be running but it's not out of the question...sometimes the service manager and the processes get out of sync with each other. :P
while(true) {self.input(sugar);} :twisted:
Top
Taladar
Guru
Guru
Posts: 458
Joined: Sat Oct 09, 2004 4:26 pm
Location: Bielefeld, Germany

  • Quote

Post by Taladar » Thu Sep 15, 2005 6:39 pm

Yes, 0.0.0.0 means all adresses on all interfaces. That should work fine. To find out what is using the adress try

Code: Select all

lsof -Pin
("-P" not port number => name conversion, "-n" same for IP and hostnames, "-i" show IP connections/listeners)
Top
klatk
n00b
n00b
Posts: 35
Joined: Fri Jun 25, 2004 7:53 pm

  • Quote

Post by klatk » Sun Sep 18, 2005 2:52 am

Taladar and Christsong84,

Thanks for the help!

I added 'ListenAddress' to my sshd_config to listen on my NIC's IP and sshd worked once I started it back up. I then used 'lsof -P -i -n' to find out what was taking up 0.0.0.0 and I didn't see anything there. So I went back and changed the 'ListenAddress' to 0.0.0.0 explicitly and it seems to be working fine now. I guess it just hadn't been specified before.
Top
ova
Retired Dev
Retired Dev
Posts: 120
Joined: Thu Nov 06, 2003 2:48 pm
Location: Russia, Moscow

  • Quote

Post by ova » Mon Oct 10, 2005 7:37 pm

Exactly the same problem here! And of course I have nothing listening on 22 port!

It seems very strange to me. To start sshd I have to specify in sshd config:

Code: Select all

Listen 0.0.0.0
In other case I see the following error:

Code: Select all

Oct 10 23:27:43 camobap sshd[30696]: Server listening on :: port 22.
Oct 10 23:27:43 camobap sshd[30696]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
I thought it is because I have openssh compiled with ipv6 support, so when it binds itself on :: address then binding to 0.0.0.0 failes. But now I compiles openssh without ipv6 support and still have this problem. May be this is because I have ipv6 enabled in kernel :?: Can anybody help me to find out why I have such problem?

BTW. amd64 :!: livecd has exactly the same problem. After setting up networking I have to modify sshd config to start sshd!!!
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic