成功地装ssh需要三步。

第一步,在https://launchpad.net/ubuntu/lucid/i386/openssh-client/1:5.3p1-3ubuntu3下载文件并安装。

第二步,在https://launchpad.net/ubuntu/lucid/i386/openssh-server/1:5.3p1-3ubuntu3下载文件并安装。

第三步,在https://launchpad.net/ubuntu/lucid/i386/ssh/1:5.3p1-3ubuntu3下载文件并安装。

下载并安装第一个文件

hadoopr@ubuntu:~/Downloads$ sudo dpkg -i openssh-client_5.3p1-3ubuntu3_i386.deb 
dpkg: warning: downgrading openssh-client from 1:5.3p1-3ubuntu5 to 1:5.3p1-3ubuntu3.
(Reading database ... 127436 files and directories currently installed.)
Preparing to replace openssh-client 1:5.3p1-3ubuntu5 (using openssh-client_5.3p1-3ubuntu3_i386.deb) ...
Unpacking replacement openssh-client ...
Setting up openssh-client (1:5.3p1-3ubuntu3) ...
Processing triggers for man-db ...

下载并安装第二个文件

hadoopr@ubuntu:~/Downloads$ sudo dpkg -i openssh-server_5.3p1-3ubuntu3_i386.deb 
Selecting previously deselected package openssh-server.
(Reading database ... 127436 files and directories currently installed.)
Unpacking openssh-server (from openssh-server_5.3p1-3ubuntu3_i386.deb) ...
Setting up openssh-server (1:5.3p1-3ubuntu3) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
 * Stopping OpenBSD Secure Shell server sshd                                                              [ OK ] 
ssh start/running, process 3822
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw ...
Processing triggers for man-db ...

下载并安装第三个文件

hadoopr@ubuntu:~/Downloads$ sudo dpkg -i ssh_5.3p1-3ubuntu3_all.deb 
(Reading database ... 127454 files and directories currently installed.)
Preparing to replace ssh 1:5.3p1-3ubuntu3 (using ssh_5.3p1-3ubuntu3_all.deb) ...
Unpacking replacement ssh ...
Setting up ssh (1:5.3p1-3ubuntu3) ...

最后试了试,成功。

hadoopr@ubuntu:~/Downloads$ ssh localhost
The authenticity of host 'localhost (::1)' can't be established.
RSA key fingerprint is 0f:f5:b7:32:06:a3:3c:4c:de:fb:04:aa:8a:f2:2d:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.

转载于:https://www.cnblogs.com/xiaohei03/p/3219480.html

在Ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)相关推荐

  1. vmware中的Ubuntu安装ssh全家桶(解决connect to host localhost port 22: Connection refused)...

    2019独角兽企业重金招聘Python工程师标准>>> 网上查询过异常信息后得知系统需要安装ssh服务. 1.重现问题:ssh localhost 报错connect to host ...

  2. Ubuntu下 ssh : connect to host localhost port 22:Connection refused

    Ubuntu下测试ssh时使用ssh localhost 命令,出现错误提示connect to host localhost port 22:Connection refused 造成这个错误的原因 ...

  3. 日常问题——解决mac下 ssh: connect to host localhost port 22: Connection refused

    问题描述: 今天使用ssh 登陆本地时即使用ssh localhost出现了 ssh: connect to host localhost port 22: Connection refused 错误 ...

  4. mac下ssh 报错:localhost: ssh: connect to host localhost port 22: Connection refused

    1.美图 2.背景 mac下本地启动hadoop 本地模式 (base) lcc@lcc hadoop-2.7.4$ sh sbin/start-all.sh This script is Depre ...

  5. mac connect to host localhost port 22: Connection refused

    在Mac OS X 10.10.5学习hadoop的过程中,输入命令ssh localhost得到 ssh: connect to host localhost port 22: Connection ...

  6. ssh: connect to host localhost port 22: Connection refused 问题

    错误原因: 1.sshd 未安装 2.sshd 未启动 3.防火墙 4需重新启动ssh 服务 解决方法: 1.确定安装sshd: $ sudo apt-get install openssh-serv ...

  7. ssh:connect to host xxx port 22: Connection refused---------you don‘t have permission to acccess the

    在自己的Ubuntu电脑上,用ssh连接xavier NX板子的时候,突然出现了连接不上的情况,提示you don't have permission to acccess the requested ...

  8. ssh: connect to host 192.***.*.* port 22: Connection refused

    在从本地电脑连接远程服务器的时候,显示了ssh: connect to host 192.*.. port 22: Connection refused这个问题. 问题出现的原因是:没有安装sshd ...

  9. ssh本机连接connect to host localhost port 2222: Connection refused

    在根据博客[https://zhuanlan.zhihu.com/p/355748937]配置和连接ssh服务的过程中,连接失败. 尝试了很多方法都不行,最后怀疑端口被占用,解决方法: 重新配置/et ...

  10. hadoop : Starting namenodes on [master] master: ssh: connect to host master port 22: Connection refu

    Starting namenodes on [master] master: ssh: connect to host master port 22: Connection refused; 本人启动 ...

最新文章

  1. 解析ArcFace源码
  2. 一种zabbix server扩容改造方案
  3. keil 查看 stm32 io波形_这样学习STM32单片机,从菜鸟到牛人很简单!
  4. Docker(三):镜像导入与导出、保存与加载、在Docker容器中安装软件
  5. hfss和python_【技术分享】python和HFSS联合仿真微带天线的教程-射频/微波-与非网...
  6. ACM MM2021 | 腾讯优图实验室9篇论文入选,含弱监督图像描述及定位、表格结构识别等研究方向...
  7. 企业memcahe如何连接mysql_Mysql和Memcached的连动
  8. html5 移动端单页面布局
  9. QTableView的表格项中加入图标的方法
  10. 机器学习入门——numpy与matplotlib的使用简介
  11. js ajax 跨域上传文件,使用 Javascript 实现跨域上传文件到存储
  12. QTableView效率优化3 - 自定义Model的内容补充
  13. MySql设置远程连接
  14. 4款好用流程图软件,都是经验总结出来的
  15. 宝塔Linux面板如何进入,云服务器怎么进入宝塔面板
  16. 微信公众号的简单开发
  17. 商络转债上市价格预测
  18. 离散选择模型(DCM)和深度神经网络(DNN)结合
  19. 打算自学一些编程,想兼职程序员打零工,想问问现在哪个程序员兼职平台单子简单,不考察接单人学历?
  20. Uncaught TypeError: Cannot read property ‘then‘ of undefined

热门文章

  1. 安装配置NTP服务器
  2. win8.1 64位安装oracle10g客户端心得
  3. Unknown type name 'class'; did you mean 'Class'? 问题的解决
  4. [CTO札记]雅虎主页改版使用户停留时间增加20% -
  5. 如何在linux中也能够使用自动类型推导关键字auto?
  6. centos下valgrind的安装与使用
  7. TopOn的两种测试方法
  8. Hibernate多列作为联合主键(六)
  9. Struts2之OGNL类型转换
  10. [渝粤教育] 广东-国家-开放大学 21秋期末考试管理学原理★10013k1