ssh 不能连上服务器 hosts.deny没有没限制ip 找不到什么原因
Posted 运维工匠实战(如果发现有错误请大家把正确的方法发送给我,方便
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ssh 不能连上服务器 hosts.deny没有没限制ip 找不到什么原因相关的知识,希望对你有一定的参考价值。
[[email protected] Downloads]# ssh -p22022 -vv 123.5x.xx.xxx OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 123.xx.xxx.xx [123.57.xx.xxx] port 22022. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type -1 debug1: identity file /root/.ssh/identity-cert type -1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_rsa-cert type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: identity file /root/.ssh/id_dsa-cert type -1 debug1: identity file /root/.ssh/id_ecdsa type -1 debug1: identity file /root/.ssh/id_ecdsa-cert type -1 ssh_exchange_identification: Connection closed by remote host
# cat /etc/hosts.allow # # hosts.allow This file contains access rules which are used to # allow or deny connections to network services that # either use the tcp_wrappers library or that have been # started through a tcp_wrappers-enabled xinetd. # # See ‘man 5 hosts_options‘ and ‘man 5 hosts_access‘ # for information on rule syntax. # See ‘man tcpd‘ for information on tcp_wrappers # sshd:all #加上这一行问题解决
但这样不安全所有的被禁掉的ip都 可以再会失效果!!!!
以上是关于ssh 不能连上服务器 hosts.deny没有没限制ip 找不到什么原因的主要内容,如果未能解决你的问题,请参考以下文章
使用/etc/hosts.allow和/etc/hosts.deny设置SSH白(黑)名单