ubuntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server,然而SSH分客户端openssh-client和服务端openssh-server,openssh-client是客户端,openssh-server是服务端,

咱们这里讲的是安装SSH的服务端,即:openssh-server。

判断咱们的机器是否安装ssh服务,可以使用如下命令:

ssh localhost
ssh: connect to host localhost port 22: Connection refused

这个就表示没有还没有安装SSH,

安装命令:sudo apt-get install openssh-server

卸载命令:sudo apt-get remove openssh-server

咱们运行 sudo apt-get install openssh-server 命令之后,确认下是否安装正常

ps -e|grep ssh

1418 ?        00:00:00 sshd

看到sshd那说明ssh-server已经启动了

如果没有则可以这样启动:sudo /etc/init.d/ssh start 或者 service ssh start

之前因为实验安装SSH,安装又卸载后却提示:E:unable to locate package opensshE:unable to locate package server这个是警告是说明本机没有找到openssh的安装包,之前能安装说明SSH包是存在的,而卸载后却提示找不到SSH包,说明很可能是运行卸载后,直接删除掉了,那么我们现在需要升级下sudo apt-get update,然后再安装试试还是不行。然后网上找了下说是更新了软件源,需要更新并且安装后才能使用 安装更新
sudo apt-get dist-upgrade

如何开启ubuntu的SSH服务(不要和openssl搞混淆了)的更多相关文章

  1. 如何开启ubuntu的SSH服务

    buntu默认并没有安装ssh服务,如果通过ssh链接ubuntu,需要自己手动安装ssh-server,然而SSH分客户端openssh-client和服务端openssh-server,opens ...

  2. Ubuntu配置SSH服务

    本文主要解决Ubuntu配置SSH服务的问题 1.1.修改可用的agt源 sudo vim /etc/apt/sources.list 1.2.更新代码包 sudo apt-get update 2. ...

  3. Ubuntu开启或重启ssh服务

    开启ssh服务首先需要安装打开ssh服务的库: sudo apt-get install openssh-server 检查当前的ssh开启情况: ps -e |grep ssh 如果有sshd,则s ...

  4. 为Ubuntu配置ssh服务 方便远程登陆

    Ubuntu系统必须开启ssh服务后,XP或者其他的主机才可以远程登陆到Ubuntu系统. 1,安装软件包,执行sudo apt-get install openssh-server Ubuntu缺省 ...

  5. UBUNTU安装 SSH 服务

    输入命令"sudo apt -y install openssh-server" 输入当前用户密码,等待完成openssh-server安装. 安装完毕,运行命令"sud ...

  6. Ubuntu安装SSH服务

    1 SSH服务 Ubuntu默认并没有安装ssh服务,如果通过ssh远程连接到Ubuntu,需要自己手动安装ssh-server(openssh-server). 1.1 检测是否安装SSH服务 出现 ...

  7. ubuntu下ssh服务相关操作

    1.安装ssh服务:apt-get install openssh-server 2.检测ssh开启状态:ps -e | grep ssh 3.启动ssh:/etc/init.d/ssh start ...

  8. 为Ubuntu安装SSH服务

    只有当Ubuntu安装了SSH服务后,我们才能够通过ssh工具登陆Ubuntu.我自己喜欢使用x-shell作为终端工具 1.安装Ubuntu缺省安装了openssh-client,所以在这里就不安装 ...

  9. [转载]Ubuntu下ssh服务的安装与登陆(ssh远程登陆)

    转载地址:http://blog.csdn.net/zht666/article/details/9340633 Ubuntu默认并没有安装ssh服务,如果通过ssh远程连接到Ubuntu,需要自己手 ...

随机推荐

  1. JVMInternals

    http://blog.jamesdbloom.com/JVMInternals.html http://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne ...

  2. Debug

    memory dump就是程序留下的一个犯罪现场,而你就是一个侦探,侦查技术越高,发现的秘密也越多,破案也就越容易.

  3. Linux下PHP+MySQL+CoreSeek中文检索引擎配置

    说明: 操作系统:CentOS 5.X 服务器IP地址:192.168.21.127 Web环境:Nginx+PHP+MySQL 站点根目录:/usr/local/nginx/html 目的:安装co ...

  4. memcached +mysql+php 测试例子

    最近看了看memcached 缓存 mysql,经过一段时间的研究·把自己测试方法写出来,给像我一样的初学者用~我的环境是 nginx + php-fpm + apc + mysql 编译安装memc ...

  5. Understanding postgresql.conf : log*

    After loooong pause, adding next (well, second) post to the “series“. This time, I'd like to describ ...

  6. C# String与string的区别

    C#中同时存在String与string MSDN中对string的说明: string is an alias for String in the .NET Framework.string是Str ...

  7. charles proxy

    charles proxy  一个比较好用的代理工具,可以进行数据的移动,以及pc 数据的抓包.

  8. hydra

    转:http://www.cnblogs.com/patf/p/3142564.html 1.yum -y install openssl-devel pcre-devel ncpfs-devel p ...

  9. zookeeper源码学习一——zookeeper启动

    最近正在研究zookeeper,一些心得记录一下,如有错误,还请大神指正. zookeeper下载地址:http://zookeeper.apache.org/releases.html,百度一下就能 ...

  10. HDP2.4安装(四):ambari安装

    ambari是apache基金会的开源项目,它的优势在于巧妙溶合已有的开源软件,提供集群自动化安装.中心化管理.集群监控.报警等功能.据Hortonwork官方资料介绍,不同的HDP版本,对ambar ...