zoukankan      html  css  js  c++  java
  • Ubuntu启动sshd服务

    1.Ubuntu主机安装ssh相关服务

    openssh-client
    openssh-server

    方法:

    sudo apt-get install openssh-client openssh-server

    检测:

    ps -e | grep sshd

    异常:当执行上述指令后未发现sshd服务在运行,可尝试如下命令

    sudo service ssh restart 或
    sudo /etc/init.d/ssh restart

    如果尝试上述命令还为起作用时,则可尝试重启主机
    2.查看活动网卡的ip地址
    如果你现在使用的是有线网络则一般对应eth0这个网络接口,
    如果是无线则对应wlan0这网络接口
    方法:

     ifconfig eth0 或者 ifconfig wlan0 (视你当前的网络情况而定)

    找到对应的ip地址:假设为ip-for-ubuntu,并测试win7与ubuntu主机的联通状况
    检测:
    打开win7的cmd,通过下面的命令

    ping -c 4 ip-for-ubuntu

    如果发送的数据都能被接收则说明通信正常,否则主机至win7的网络设置或者链路不通
    异常: 如果链路不通,通过其他方法检测故障原因并修复

    3.使用putty登录ubuntu主机
    注意:ubuntu系统使用UTF-8作为默认编码方式,所以putty的translation方式
    应与其保持一致,以免出现乱码,刚开始如果未对sshd服务的配置文件做相应修改
    则root账户是无法通过sshd直接登录,因为在配置文件中PermitRootLogin的选项
    默认为without-password,则root用户无法使用密码验证的功能,故应将其改为
    yes
    即将:

    PermitRootLogin without-password

    改成

    PermitRootLogin  yes

    并通过

    service ssh restart

    重启服务以使配置文件的修改立即生效

    相关文件:

    ssh配置文件所在目录:/etc/ssh/,其中主要配置文件是sshd_config
    ssh启动脚本:/etc/init.d/ssh
    sshd_config说明文件:man 5 sshd_config

  • 相关阅读:
    cake缓存
    css 总结文章
    cakephp随笔
    41.2WebSocket Security网络套接字安全
    36.1 DelegatingSecurityContextRunnable委托安全上下文可运行
    Spring Data Integration
    40. Security Database Schema安全数据库模式
    36.2 DelegatingSecurityContextExecutor委托安全上下文执行器
    41. The Security Namespace
    41.3 Authentication Services认证服务
  • 原文地址:https://www.cnblogs.com/austinspark-jessylu/p/6755506.html
Copyright © 2011-2022 走看看