zoukankan      html  css  js  c++  java
  • openstack创建虚拟机之后使用ssh登陆的解决办法

    创建一个虚机之后:
    若果想要在horizon的控制台上登录操作,
    第一步、需要先使用ssh从controller上修改密码
    从controller上登录:
    ssh ubuntu@虚机ip
    sudo su # 切换到root用户下。
    sudo passwd # 修改root的密码

    第二步、再从horizon的控制台上登录即可。 root/密码

    如果要从其他设备(非controller)上登录创建的虚机需进行以下操作修改配置:
    1、与第一步相同。

    2、修改两个文件: /etc/ssh/ssh_config 和 /etc/ssh/sshd_config

    若没有文件为只读,修改权限命令
    chmod 777 filename 如: chmod 777 sshd_config

    vim /etc/ssh/ssh_config
    注释下面两行:
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

    vim /etc/ssh/sshd_config
    添加:
    UseDNS no
    部分配置修改为:
    PermitRootLogin yes # 允许远程登录

    RSAAuthentication yes
    PubkeyAuthentication yes #这两项为打开公钥模式
    PasswordAuthentication yes #打开密码验证模式
    AuthorizedKeysFile .ssh/authorized_keys #配置公钥记录文件

    3.重启ssh
    service ssh restart

    4、使用上面的root/密码 在其他设备上即可登录了。

  • 相关阅读:
    Two Sum
    Binary Tree Preorder Traversal *
    Rotate Array
    Repeated DNA Sequences
    Symmetric Tree
    Path Sum
    Python初学——多线程Threading
    Python初学——窗口视窗Tkinter
    pyinstaller打包多个py文件和去除cmd黑框
    python获取当前路径
  • 原文地址:https://www.cnblogs.com/jylee/p/10132057.html
Copyright © 2011-2022 走看看