一、问题无法ssh直接连接到服务器

[C:\~]$ ssh 192.168.7.77

Connecting to 192.168.7.77:...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.
Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host(192.168.7.77:) at ::.

二、问题原因及解决方法

sshd的配置,自己的IP地址没有加入到hosts.allow配置文件中,而hosts.deny则拒绝了除allow外的所有主机登录。

解决方法:把自己的IP地址加入到hosts.allow文件中,并重启sshd服务。

# ll /etc/hosts.*
-rw-r--r-- root root Jan /etc/hosts.allow
-rw-r--r-- root root Aug /etc/hosts.deny
# grep -Ev '#' /etc/hosts.deny
sshd:all
# grep -Ev '#' /etc/hosts.allow
sshd:192.168.7.100/255.255.255.255

ssh无法登录,提示Connection closing...Socket close.的更多相关文章

  1. xshell连接不了虚拟机处理方法(错误提示:Connection closing...Socket close.Connection closed by foreign host.Disconnected from remote host(localhost) at 08:47:23.)

    一.问题描述:xshell连接不了虚拟机,出现错误提示:Connection closing...Socket close.Connection closed by foreign host.Disc ...

  2. ssh无法登录,提示Pseudo-terminal will not be allocated because stdin is not a terminal.

    当远程通过ssh登录主机时出现Pseudo-terminal will not be allocated because stdin is not a terminal. 错误   字面意思是伪终端将 ...

  3. Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host(centos6.9) at 14:59:05.

    查找网上资料解决方法如下 [root@localhost ssh]# service sshd start Starting sshd: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...

  4. Linux下启动tomcat报错,WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect java.net.ConnectException:

    tomcat启动完了之后,一直不停的打印这种错误信息,看表面上,应该是zk节点下的数据是空的,连接不上服务,所以一直在尝试连接,然后一直又连不上: 完整的错误信息: 407662 [usf-ZooKe ...

  5. 服务器ssh登录提示“Permission denied, please try

    原因:不用怀疑,一般情况下,就是你密码输入错误了. 解决:找到正确的密码输入. 当然,也有可能是下面的情况: 在Windows中使用ssh客户端连接,提示"ssh服务器拒绝了密码,请再试一次 ...

  6. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn)

    [2017-05-19 13:32:14,933] INFO Waiting for keeper state SyncConnected (org.I0Itec.zkclient.ZkClient) ...

  7. WARN Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect (org.apache.zookeeper.ClientCnxn) java.net.ConnectException: Connection refused

    1.启动kafka的脚本程序报如下所示的错误: [hadoop@slaver1 script_hadoop]$ kafka-start.sh start kafkaServer... [-- ::,] ...

  8. hadoop mapreduce 写入hbase报错 Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect

    现象:map任务构造数据正常,reduce任务,开始也正常,速度很快 ,在hbase 的管理界面,可以看到,5W以上的请求数 当reduce 执行到 70% 左右的时候,就堵住了,查看yarn的web ...

  9. 【浅层优化实战】ssh远程登录Linux卡慢的全过程排查及解决方案

    ssh远程登录Linux卡慢的全过程排查及解决方案 前言: 在linux操作系统使用过程中偶然一次感到使用ssh远程连接软件连接操作系统需要等待许久,第一次没在意,第二次也没在意,第三次有点忍受不住了 ...

随机推荐

  1. 构建第一个SpringBoot工程

    学习和使用 SpringBoot 有一段时间了,现在开始陆陆续续会总结归纳 SpringBoot 学习中遇到的相关知识点. SpringBoot 设计目的是用来简化新Spring应用的初始搭建以及开发 ...

  2. 使用angular-cli脚手架快速搭建项目

    第一步 安装全局的angular-cli, npm install -g @angular/cli 或者 cnpm install -g @angular/cli@v1.0.0-rc.2 – 国内淘宝 ...

  3. Net Core通用主机项目报错 程序不包含适合于入口点的静态Main

    Net Core通用主机的介绍: https://docs.microsoft.com/zh-cn/aspnet/core/fundamentals/host/generic-host?view=as ...

  4. AWS CSAA -- 04 AWS Object Storage and CDN - S3 Glacier and CloudFront(二)

    015 Version Control - Lab 016 Cross Region Replication 017 Lifecycle Management  Glacier - Lab 018 C ...

  5. 三种方法实现java调用Restful接口

    1,基本介绍 Restful接口的调用,前端一般使用ajax调用,后端可以使用的方法比较多, 本次介绍三种: 1.HttpURLConnection实现 2.HttpClient实现 3.Spring ...

  6. 修改centos等linux的hostname-永久生效

    步骤uname -a (或者hostname)可以看到hostname,修改步骤如下: uname -a 查看hostnamehostname newname 修改下,让hostname立刻生效.vi ...

  7. SharePoint读取配置文件

    配置文件存放目录 C:\inetpub\wwwroot\wss\VirtualDirectories\80\web.config 读取配置 string Name=Configuration.WebC ...

  8. months_between()用法

    orcl中months_between()函数用法如下: 格式:即MONTHS_BETWEEN(日期1,日期2) 例如: select months_between(to_date('2018-10- ...

  9. MySQL基础之 日期时间函数

    基础日期函数和时间函数 1.CURDATE()函数:返回当前只带有年月日格式的日期 2.CURTIME()函数:返回当前只带有时分秒格式的时间 3.NOW()函数:返回当前日期和时间 4.UNIX_T ...

  10. django模板系统(下)

    主要内容:母版,继承母版,块,组件,静态文件 母版 <!DOCTYPE html> <html lang="en"> <head> <me ...