SSH(ssh: connect to host localhost port 22: Connection refused)问题的解决

centos默认并没有安装ssh服务,如果通过ssh链接centos,需要自己手动安装openssh-server。判断是否安装ssh服务,可以通过如下命令进行:
输入

ssh localhost

如果:输出

ssh: connect to host localhost port 22: Connection refused

证明尚未安装,这时我们需要安装openssh-server,命令如下:

yum install openssh-server

安装完成后,我们再输入以下,就可以远程登录了。

ssh [email protected]

参考https://www.linuxidc.com/Linux/2015-01/112045.htm

你可能感兴趣的:(linux)