zoukankan      html  css  js  c++  java
  • 虚拟机XP 连接 虚拟机 linux

    使用软件: putty

    虚拟机都使用   NAT  这样他们处于 一个网段中


    linux 下  ifcondif  查看IP

    XP    下   ipconfig  查看IP

    linux 下查看 用户 密码等  cat /etc/passwd

    问题:
      使用putty登录显示network error:Connection refused 或者显示network error:Connection timeout 

    解决方法:
      1.vi /etc/ssh/sshd_config 将PermitRootLogin的注释取消,或者将no改为yes。(如果没有sshd_config文件说明linux上没有安装SSH,使用 yum -y  install ssh安装之后,sshd-config文件中PermitRootLogin选项默认的是yes,新安装的ssh不用操作下面两部)
      2.
    root@bt:~# /etc/init.d/ssh restart
    Could not load host key: /etc/ssh/ssh_host_rsa_key
    Could not load host key: /etc/ssh/ssh_host_dsa_key
     * Restarting OpenBSD Secure Shell server sshd                                                                  Could not load host key: /etc/ssh/ssh_host_rsa_key
    Could not load host key: /etc/ssh/ssh_host_dsa_key


    解决方法:
    root@bt:~# ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key
    Generating public/private rsa key pair.
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /etc/ssh/ssh_host_rsa_key.
    Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub.
    The key fingerprint is:
    85:e6:83:c5:a9:91:0d:8e:2a:6b:b1:e5:7b:db:d3:b2 root@bt
    The key's randomart image is:
    +--[ RSA 2048]----+
    |      .          |
    |     o = o       |
    |    . + B .      |
    |   .   B .       |
    |....  o S        |
    | o=      .       |
    |.o .    .        |
    |.   ...o .       |
    |   ....E+        |
    +-----------------+


    root@bt:~# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
    Generating public/private dsa key pair.
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /etc/ssh/ssh_host_dsa_key.
    Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub.
    The key fingerprint is:
    bc:0d:45:c8:62:85:c4:6e:a2:90:e4:3b:e4:38:8a:35 root@bt
    The key's randomart image is:
    +--[ DSA 1024]----+
    |     o.+...      |
    | .    = o.       |
    |o.   o .  .      |
    |oo  . o. .       |
    |+... o  S        |
    |o+E      +       |
    |oo..    . .      |
    |o                |
    |                 |
    +-----------------+


      3.service iptables stop命令进入将防火墙关闭。

    最后  登陆 用 root 账户登陆





    另外   更新  MSF  :   http://blog.chinaunix.net/uid-13344516-id-3597709.html







  • 相关阅读:
    wikioi-1039-数的划分
    BNUOJ27873:A Special "Happy Birthday" Song!!!
    BaseAdapter 注意的关键点!
    装饰器模式
    【Leetcode】Same Tree
    科学-科研装置:大科学装置
    汉语-词语:言情
    Error-ONS-ASP.NET-IIS:0x000007FEFC8ABE0D (KernelBase.dll) (w3wp.exe 中)处有未经处理的异常: 0xE0434352
    协议-网络-TCP/IP:Telnet
    Error-ONS-ASP.NET-ISS:0x000007FEFD04BE0D (KernelBase.dll) (w3wp.exe 中)处有未经处理的异常: 0xE0434352
  • 原文地址:https://www.cnblogs.com/zcc1414/p/3982376.html
Copyright © 2011-2022 走看看