加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

error: Bind to port 22 on 0.0.0.0 failed

(2010-07-28 21:22:03)
标签:

杂谈

分类: oracle

My operating system is Red Hat Enterprise Linux AS 4 , and I've seen the following error in my security log since I restart sshd:

Code:

sshd[7145]: Server listening on :: port 22.
sshd[7145]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.


Reasons:

It's because :: is IPv6 address, and this is what SSH binds to when it first starts, being that IPv4 is also enabled, when it tries to bind to the IPv4 address, it finds that it is already being used.

Disable IPv6 in the ssh config file and re-post if the problem persists. It looks like you are trying the bind to port 22 twice, once with IPv6 and again with IPv4.

Solutions:

Possibly disable IPv6 support in kernel (?) or use the ListenAddress option in your SSHD server config file.

If you're not using IPv6, just disable it in sshd_config:

Code:

ListenAddress 0.0.0.0
#ListenAddress ::


(or bind the ListenAddress to a specific IP)

from:http://hi.baidu.com/shuig/blog/item/13f1ef1216f76e57f919b81f.html

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有