• 虚拟机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







  • 相关阅读:
    关于ip层的作用网址链接
    转载 TCPIP学习笔记之概述
    转载pll工作模式解析
    关于modelsim添加库的说明
    转载.Avalon-MM 阿窝龙妹妹应用笔记
    转载.怎样在Quartus II中转化HDL文件为bsf文件?
    niosii boot过程
    转载--傅里叶级数的几何意义 – 巧妙记忆公式的方法
    第十三篇:带缓冲的IO( 标准IO库 )
    第十二章:Linux中权限控制实例
  • 原文地址:https://www.cnblogs.com/zcc1414/p/3982376.html
Copyright © 2020-2023  润新知