linux连接xshell出现错误

系统是 red hat(64位)    centos 7  


Connecting to 192.168.56.1:23... 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.56.1) at 19:20:05.


查看Linux ip的两种方法:

ifconfig                  ip address

如出现以下错误:先看下端口是否设置对。

ssh 服务是否开启


检查 sshd 服务是否已经开启,输入

ps -ef | grep sshd

ssh服务开启命令

service sshd start

开机自启动命令

systemctl enable sshd.service

也有可能是linux防火墙没有关闭。

防火墙关闭:systemctl disable firewalld

防火墙开启:systemctl enable firewalld 

命令在linux终端下输入

注:可能不够完善,但一般都能解决。

============================================================

linux开启自动连接网络


1.打开终端进入root

2.cd /etc/sysconfig/network-scrpts

3.vi  ifcfg-enp0s3      (centos7系统)

4.按i进入编辑模式,将ONBOOT改为yes

5.按下键盘ESC键之后输入:wq保存退出



  

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。