1. 程式人生 > >ssh:connect to host localhost port 22: Connection refused解決方法

ssh:connect to host localhost port 22: Connection refused解決方法

安裝hadoop的時候,需要配置ssh無密登入
執行ssh localhsot的時候會報錯:
linux系統(centos6.4)
ssh:connect to host localhost port 22: Connection refused
解決方法:
1.檢查是否安裝了openssh-server

ps -e|grep ssh

如果只出現了一個ssh,說明沒有安裝可以自行上網解決,一般centos是預設安裝的,不會出現這種情況。
2.sshd未啟動

service sshd restart

重啟後
ssh localhost應該能正常的看到輸入密碼的情況了。