• SSH,如何恢复通过输入密码的方式来登录服务器


    转:http://www.auvps.com/post_612.html

    SSH,如何恢复通过输入密码的方式来登录服务器

    为了服务器的安全,像日本的名前vps,SSH的远程登录,就采取只能通过密钥key来登录服务器。密钥登录安全是安全,但是一旦密钥(key)没在身边的话,就痛苦了。要方便,不要安全,如何设置ssh通过密码登录呢?

    1,先登录后台,通过页面vnc登录上VPS

    ssh

    2,vim /etc/ssh/sshd_config 文件,进行如下设置:

     

    root用户通过 SSH 登录:

    找到 PermitRootLogin yes   把## 删除

    设置为 
    PermitRootLogin yes

    PermitRootLogin yes

    3,文件浏览到最底部,启用密码登录:

    找到  
    PasswordAuthentication no 
    改为 
    PasswordAuthentication yes

    PasswordAuthentication yes

    4,重启sshd服务。然后就可以用putty等工具远程连接了。

    service sshd restart

    service sshd restart

  • 相关阅读:
    有一个双重模板化的错误实现
    非类型模板参数
    C++模板
    初始化列表initializer_list
    C++类型转换
    const引用和constexpr
    逆元
    卡特兰数
    最短路问题
    Android打印机效果的闪屏
  • 原文地址:https://www.cnblogs.com/hiaming/p/8967831.html
Copyright © 2020-2023  润新知