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

相關文章
相關標籤/搜索