在ubuntu中配置SSH(解決connect to host localhost port 22: Connection refused問題)

Ubuntu下測試ssh時使用ssh localhost 命令,出現錯誤提示connect to host localhost port 22:Connection refused

 

造成這個錯誤的原因可能是ssh-server未安裝或者未啓動。ubuntu 11.10 默認安裝openssh-client,但是木有安裝server

 

運行 ps -e | grep ssh,查看是否有sshd進程

 

如果沒有,說明server沒啓動,通過 /etc/init.d/ssh -start 啓動server進程,如果提示ssh不存在 那麼就是沒安裝server

 

通過 sudo apt-get install openssh-server命令安裝即可

 

 

 

轉載請註明源 http://asyty.iteye.com/blog/1440141

發佈了2 篇原創文章 · 獲贊 5 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章