ssh: connect to host localhost port 22: Connection refused 问题
来源:互联网 发布:白岩松事件犯众怒知乎 编辑:程序博客网 时间:2024/05/22 11:47
命令:ssh localhost
错误信息:ssh: connect to host localhost port 22: Connection refused
错误原因:
1.sshd 未安装
2.sshd 未启动
解决方法:
1.确定安装sshd:
输入命令:
错误信息:ssh: connect to host localhost port 22: Connection refused
错误原因:
1.sshd 未安装
2.sshd 未启动
3.防火墙
4需重新启动ssh 服务
解决方法:
1.确定安装sshd:
$ sudo apt-get install openssh-server2.启动sshd:
$ sudo net start sshd3.检查防火墙设置,关闭防火墙:
$ sudo ufw disable检验方法:
输入命令:
$ ssh localhost
若成功,则表示安装成功,且连接通过;
但是有的时候虽然成功了但是还是会出现Connection refused 问题。
运行 ps -e | grep ssh,查看是否有sshd进程:
有时候虽然可以看到sshd 但是还是不能连接成功
这时候就要想到重新启动一下:sudo service ssh restart
然后在连接
0 1
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- ssh: connect to host localhost port 22: Connection refused 问题
- 输入ssh localhost, 出现问题“ssh: connect to host localhost port 22: Connection refused”
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- cygwin ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- Ubuntu ssh: connect to host localhost port 22:Connection refused
- ssh: connect to host localhost port 22: Connection refused
- Linux--ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- ssh: connect to host localhost port 22: Connection refused
- SRM 658 DIV1 650 二分答案 动态规划
- Androin学习笔记二十一:wifi的简单使用方法----获得本机或主机信息
- c++中 static修饰修饰类声明部分
- acm 2016/5/18 hpu15级练习 G
- 为什么做java的web开发我们会使用struts2,springMVC和spring这样的框架?
- ssh: connect to host localhost port 22: Connection refused 问题
- Eclipse如何生成文档(javadoc):
- 2016阿里前端实习生北京一面(已挂)
- 自定义标题时you can not combine custom title with other title features
- 关于命令行参数argv(《学习OpenCV》)
- nginx变量使用方法详解(5)
- ssh,scp远程连接,上传下载文件
- 服务器远程连接端口号修改
- python unix :No such file or directory