ssh到localhost或127.0.0.1拒绝连接
通过ssh连接到本机报错
ssh: connect to host localhost port 22: Connection refused,
你能用ssh登录其它主机并不代表着本地有ssh服务,要安装该服务才可以
生成ssh秘钥
$ ssh-keygen -t rsa (连按两次回车,生成秘钥) $ cat ~/.ssh/id_rsa >> ~/.ssh/authorized_keys安装openssh-server(以ubuntu操作系统为例)
$ sudo apt install openssh-server $ sudo /etc/init.d/ssh start测试
$ ps -ef | grep ssh(查看sshd进程) $ ssh localhot
ssh到localhost或127.0.0.1拒绝连接的更多相关文章
- Linux无法连接上127.0.0.1,拒绝连接,更新时提示无法下载,无法正常使用apt-get update
你是否遇到过这种情况,在Linux以apt-get update 时更新的时候无法更新,提示一下内容 p { margin-bottom: 0.25cm; line-height: 120% } 错误 ...
- localhost与127.0.0.1的区别
localhost与127.0.0.1的区别是什么 定义 localhost也叫local ,正确的解释是:本地服务 127.0.0.1在windows等系统的正确解释是:本机地址(本机服务器) 不同 ...
- fiddler监听127.0.0.1或localhost
localhost/127.0.0.1的请求不会通过任何代理发送,fiddler也就无法截获. 解决方案 1,用 http://localhost. (locahost紧跟一个点号)2,用 http: ...
- android异常: java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused
android手机做下载文件时,报了如下异常: java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused 模拟器 ...
- 如果觉得配置文件没有错,但web-dev-server总是报错,可以在hosts文件里加一行127.0.0.1 localhost
如果觉得配置文件没有错,但web-dev-server总是报错,可以在hosts文件里加一行127.0.0.1 localhost
- linux下使用localhost和127.0.0.1都不能连接的解决思路
linux下刚安装了mysql,尝试写了程序连接mysql,出现了只有用本地ip地址才能连接,而127.0.0.1和localhost都不能访问 解决这个问题主要查看3个方向 .hosts中是否有ip ...
- [转载]localhost与127.0.0.1的区别
原文链接:http://blog.csdn.net/xifeijian/article/details/12879395 很多人会接触到这个ip地址127.0.0.1.也许你会问127.0.0.1是什 ...
- Tomcat在局域网中localhost可以访问,但是无法通过本地ip访问,127.0.0.1也无法访问问题的解决方法
环境:Tomcat6,Windows Server2008 R2, Tomcat使用默认端口8080. 在BO服务器上使用Tomcat6作为WEB服务器,在服务器本地使用http://localhos ...
- MySQL主机127.0.0.1与localhost区别总结
1. mysql -h 127.0.0.1 的时候,使用TCP/IP连接, mysql server 认为该连接来自于127.0.0.1或者是"localhost.localdomain&q ...
随机推荐
- 【C#】【MySQL】C#连接MySQL数据库(三)登陆注册代码
项目结构 项目代码 WebForm_Login.aspx <%@ Page Language="C#" AutoEventWireup="true" Co ...
- C# 温故知新 第一篇 C# 与 .net 的关系
C# 与.net 的关系很多初学者或者未从事过.net 研发的编程人员 都不是很清楚,认为 C# 与.net 是一回事. 我们经常说java开发,C++开发,指的是两种开发语言:但是 经常看到 .ne ...
- Tableau如何绘制多边形地图
一.把省\自治区拖拽至标记生成地图二.把销售额拖拽至标记 三.地图-地图层-冲蚀100% 四.最终结果如图所示
- vue 判断页面是否滚动到底部
需求 要求用户阅读完本页所有内容后,下一步按钮才可以点击. 实现思路 通过判断当前页面是否到达底部来设置按钮的点击事件. 要判断当前页面是否到达底部需要用到三个距离--距离顶部的距离scrollTop ...
- Python obj与JSON相互转换
1 # _*_ coding:utf-8 _*_ 2 3 def showJson(self, pipefd): 4 overdict = args.__dict__ 5 # 此时就可以用json.d ...
- nim_duilib(18)之xml控件关联优化
方法1 直接调用函数FindControl函数,返回Control*类型,对返回的类型强制转换 ui::CheckBox* pcheckbox = (ui::CheckBox*)(FindContro ...
- 【LeetCode】163. Missing Ranges 解题报告 (C++)
作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 遍历 日期 题目地址:https://leetcode ...
- 【LeetCode】915. Partition Array into Disjoint Intervals 解题报告(Python)
作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 题目地址: https://leetcode.com/problems/partitio ...
- codeforce -602B Approximating a Constant Range(暴力)
B. Approximating a Constant Range time limit per test 2 seconds memory limit per test 256 megabytes ...
- codeforces B. Island Puzzle
B. Island Puzzle time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...