SercureCRT 连不上Linux 和配置SSH方法

连接Linux 提示错误信息:the remote system refused the connection

1、SecureCRT 连接不上LINUX 的 解决方法:

首先查看sshd服务的状态html

service sshd status

看ssh服务有没有开启,没有开启为inactive的话须要开启服务。java

service sshd start

想让他开机自动启动,就chkconfig sshd on。ssh

另外看tcp

iptables -L

看ssh服务有没有被禁用,iptable服务能够用iptables -F进行关闭。
spa


2、其它一些配置SercureCRT的方法

一、检查是否安装SSH服务,若是没有
.net

#apt-get install ssh 安装ssh服务

二、编辑配置文件
code

/etc/ssh/sshd_config  配置文件 

Port 3322 #修改端口为3322(自定义) 
PermitRootLogin no #禁止root用户远程登陆 
PubkeyAuthertication yes #容许用key登陆 
PasswordAuthertication no #禁止远程ssh客户端用密码登陆

三、开启3322 端口htm

iptables设置 开启3322端口容许访问
iptables -I INPUT -p tcp --dport 3220 -j ACCEPT


另外配置public key 能够参考连接ip

相关文章
相关标签/搜索