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

ssh:connect to host localhost port 22: Connection refused

1.先徹底刪除ssh內容

sudo apt-get remove --purge openssh-server

2.重新安裝openssh-server

sudo apt-get install openssh-server  (openssh-client可以不裝)

3.檢視程式是否正確執行

ps -ef | grep ssh

netstat -ano