zoukankan      html  css  js  c++  java
  • Linux 安装SSH

    ●centOS/redhat安装SSH
    查询openssh server服务状态:systemctl status sshd
    安装sshd命令: yum install openssh-server
    安装后启动:systemctl start sshd
    ●Ubuntu ssh-server 安装
    ●1,安装ssh-server
    Ubuntu默认并没有安装ssh服务。
    ①,判断是否安装ssh服务,可以通过如下命令进行:
    ps -e | grep ssh
    出现:
    ssh-agent表示ssh-client启动
    sshd表示ssh-server启动了。
    如果缺少sshd,说明ssh服务没有启动或者没有安装。
    安装ssh-client命令:sudo apt-get install openssh-client
    安装ssh-server命令:sudo apt-get install openssh-server
    安装完成以后,先启动服务:sudo /etc/init.d/ssh start
    启动后,可以通过“ps -e | grep ssh”查看是否正确启动。
    ★问题:安装 sudo apt-get install openssh-server时,出现如下错误:
    The following packages have unmet dependencies:
    openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu2.8)
    Recommends: ssh-import-id but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    ★原因:这是因为,openssh-server是依赖于openssh-clien的,ubuntu自带的openssh-clien与
    所要安装的openssh-server所依赖的版本不同,这里所依赖的版本是:(1:6.6p1-2ubuntu2.8)。
    ★解决:
    user01@ubuntu:~$ sudo apt-get install openssh-client=1:6.6p1-2ubuntu2.8
    然后再安装SSH Server即可。
    ------山的那一边
  • 相关阅读:
    Android 4.1 for Developers
    Frame Animation 帧动画
    07事事精明,人人远离。
    Launcher 拖拽 流程小结『android 2.3 2.2』
    Android开发书籍推荐
    My first App EncryptWheel is in WAITING FOR REVIEW status
    ubuntu安装显卡驱动
    Shell脚本学习笔记(十)文件操作
    Shell脚本学习笔记(四)流程控制
    Shell脚本学习笔记(五)函数
  • 原文地址:https://www.cnblogs.com/mountain2011/p/9008101.html
Copyright © 2011-2022 走看看