ubuntu能ping通却ssh不上(connect to localhost port 22: Connection refused)解决办法
问题:ssh 192.168.144.130ssh: connect to host 192.168.144.130 port 22: Connection refused 原因:因为Ubuntu默认没有安装openssh-server检查是否安装指令:$ ps -e|grep ssh如何输出没有或者只有一个ssh-agent就说没没安装. 安装指令: $ sudo apt-get in
·
1. 问题描述:
ssh 192.168.144.130
ssh: connect to host 192.168.144.130 port 22: Connection refused
2. 原因
因为Ubuntu默认没有安装openssh-server
- 检查是否安装:
$ ps -e|grep ssh
如果输出没有或者只有一个ssh-agent就说没没安装.
3.解决办法
- 安装openssh-server
$ sudo apt-get install openssh-server
- 检查是否安装成功
$ ssh localhost
//或者用
$ ps -e|grep ssh
-
如果要输密码就说明成功
-
如有其他问题欢迎留言探讨!!
更多推荐
所有评论(0)