ssh: connect to host localhost port 22: Connection refused 问题
错误原因:
1.sshd 未安装
2.sshd 未启动
3.防火墙
4需重新启动ssh 服务
解决方法:
1.确定安装sshd:
$ sudo apt-get install openssh-server
2.启动sshd:
$ sudo net start sshd
3.检查防火墙设置,关闭防火墙:
$ sudo ufw disable
检验方法:
输入命令:
$ ssh localhost
若成功,则表示安装成功,且连接通过;
但是有的时候虽然成功了但是还是会出现Connection refused 问题。
运行 ps -e | grep ssh,查看是否有sshd进程:
有时候虽然可以看到sshd 但是还是不能连接成功
这时候就要想到重新启动一下:sudo service ssh restart
然后在连接
转自: http://www.xuebuyuan.com/733655.html
ssh: connect to host localhost port 22: Connection refused 问题的更多相关文章
- 运行Hadoop start-all.sh遇到的错误ssh: connect to host localhost port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused 我的情况是ssh server没装,查看方法: ps -e |grep ssh 1 ...
- ssh: connect to host localhost port 22: Connection refused
1.hadoop安装好之后,执行ssh localhost无法执行, 提示“ssh: connect to host localhost port 22: Connection refused”. 2 ...
- 新手git: ssh: connect to host localhost port 22: Connection refused
由于gitlab上要git pull或者git clone,可是每次都出现这个问题.之前偶尔出现这个问题.可是仅仅是偶尔.这是为什么呢?然后就開始搜索网上的解决方式了. 这个问题搜索网上非常多答案.可 ...
- ssh本机失败(ssh: connect to host localhost port 22: Connection refused)
ssh本机失败(ssh: connect to host localhost port 22: Connection refused) 一. 问题描述 之前一直在服务上使用宝塔面板, 今天突发奇想, ...
- Ubuntu下 ssh : connect to host localhost port 22:Connection refused
Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因 ...
- 使用ssh localhost命令,发生异常ssh: connect to host localhost port 22: Connection refused
使用"ssh localhost"命令,失败: 问题分析如下: 出现这个问题是因为Ubuntu默认没有安装openssh-server.检查是否安装了openssh-server, ...
- 解决osx下 ssh: connect to host localhost port 22: Connection refused
解决办法: 终端下执行:sudo systmesetup -setremotelogin on
- mac connect to host localhost port 22: Connection refused
在Mac OS X 10.10.5学习hadoop的过程中,输入命令ssh localhost得到 ssh: connect to host localhost port : Connection r ...
- ssh: connect to host master port 22: Connection refused
hadoop集群启动的时候namenode显示Connection refused 到windows下ping master 显示传输中过期 ip是静态的 ssh master 也是连接拒绝 重启s ...
随机推荐
- JS实现Ajax,Josn数据的序列化和反序列化---例: 省市区联动(包含get,post)
服务器端相应JOSN数据 用到序列化和反序列化----命名空间using System.Web.Script.Serialization; public void ProcessRequest(H ...
- 使用TransactionScopeOption 管理事务流
可通过调用一个方法来嵌套事务范围,该方法在使用其自己范围的方法中使用 TransactionScope,下面示例中的 RootMethod 方法就是前者这样的方法. void RootMethod() ...
- poj1703 并查集
输入是2个不在一起的人,可以用一个数组来保存和他矛盾的人.这样find的时候就find(hash[]);就可以: #include<stdio.h> #include<string. ...
- int和integer的比较
程序代码: Integer i01 = 59; int i02 = 59; Integer i03 =Integer.valueOf(59); Integer i04 = new Integer(59 ...
- PLSQL导入Excel数据方法
1.把Excel文件另存为(文本文件(制表符分隔)(*.txt)) 2.把新生成的student.txt文件导入到plsql 打开plsql连接到要导入的oracle数据库再打开Tools - ...
- MySQL tips (日期时间操作/concat 等)
1. Query结尾要加一个分号: 2. 数据库和表 SHOW DATABASES; USE YOUR_DB; SHOW TABLES; SHOW COLUMNS FROM study或者D ...
- BZOJ-1227 虔诚的墓主人 树状数组+离散化+组合数学
1227: [SDOI2009]虔诚的墓主人 Time Limit: 5 Sec Memory Limit: 259 MB Submit: 914 Solved: 431 [Submit][Statu ...
- ZOJ 2110 Tempter of the Bone
Tempter of the Bone Time Limit: 2 Seconds Memory Limit: 65536 KB The doggie found a bone in an ...
- A.3 词法分析器
包 lexer 是词法分析器的代码的扩展.类 Tag 定义了各个词法单元对应的常量. 1: package lexer; 2: public class Tag { 3: public final s ...
- 在 ASP.NET MVC 3 中应用 KindEditor
http://www.cnblogs.com/weicong/archive/2012/03/31/2427608.html 第一步 将 KindEditor 的源文件添加到项目中,建议放到 /Scr ...