Ubuntu ssh port 22 :Connection refused

ssh localhost 报错:

ssh: connect to host localhost port 22: Connection refused


一般是server没安装,安装即可

apt-get install openssh-server

重启服务

/etc/init.d/ssh restart

可能安装好了之后,还是没法启动sshd

ps -e | grep ssh

应该有ssh-agent和sshd 两个进程

如果没有,电脑重启就可。


或者查看防火墙是否开启

ufw status

 


你可能感兴趣的:(Ubuntu ssh port 22 :Connection refused)