Putty鏈接虛擬機Centos出現:Network error:Connection refused的解決方法

轉自:http://www.bcoder.cn/17251.htmlhtml

我和不少人同樣都是linux菜鳥,可是呢又對此非常感興趣,不折騰就是不爽;linux

我下載了centos 6.4安裝好在VMware 虛擬機後一切正常;centos

因而我在本機安裝下載Putty來鏈接虛擬機中的centos系統ssh

結果提示:Network error:Connection refused 錯誤code

意思是:鏈接被拒絕server

這裏順便給你們提供一個putty中文版下載htm

地址:http://www.5yun.org/148.html教程

network error:connection refused

ping了一下虛擬機ip,能正常平通ip

putty

首先檢查SSHD服務是否啓用

進入Centos終端輸入 #ssh localhostget

若是提示:ssh: connect to host localhost port 22: Connection refused 錯誤

不用管它,沒有啓動sshd服務的緣故

安裝sshd命令: #yum install openssh-server

安裝好後開啓: #/etc/init.d/sshd start

萬一此時仍是鏈接不上去,關閉防火牆或者開放22端口便可

關閉防火牆命令:# /etc/init.d/iptables stop

3

大功告成,此時window 7 已經能夠正經常使用putty訪問 虛擬機centos了

4

小提示:

以上命令操做必須在root權限下進行,否則會操做失敗;

切換選擇root權限教程請看 http://www.5yun.org/138.html 詳細介紹

相關文章
相關標籤/搜索