首页 > 系统服务 > 详细

Kali linux 配置静态网络与开启SSH服务

时间:2020-11-02 11:56:24      阅读:79      评论:0      收藏:0      [点我收藏+]

kali虚拟机配置静态IP地址

  • 配置kali usb网卡

    • kali不支持内置网卡,仅仅支持usb网卡

    • 添加静态IP配置
      # vim /etc/network/interfaces
      ‘‘‘
      allow-hotplug eth0
      auto eth0
      iface eth0 inet static
      address 192.168.24.129  【自定义本机虚拟网卡的同网段ip】
      netmask 255.255.255.0   
      gateway 192.168.24.2    
      ‘‘‘
    • 修改dns
      # vim /etc/resolv.conf 
      ‘‘‘
      nameserver 192.168.24.2 【填写自定义dns ip】
      ‘‘‘
    • 启动网络服务
      # service networking restart
  • 可能报错

    • 报错描述:
      kali systemd[1]: Starting Raise network interfaces...
      kali ifup[3457]: RTNETLINK answers: File exists
      kali ifup[3457]: ifup: failed to bring up eth0
      kali systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
      kali systemd[1]: networking.service: Failed with result ‘exit-code‘.
      kali systemd[1]: Failed to start Raise network interfaces.
    • 解决方案:
      # ip addr flush dev eth0
      # service networking restart
      # service networking status 【查看状态】

打开kali ssh服务

  • 操作步骤

    • 修改配置文件:
      ?
      # vim /etc/ssh/sshd_config
      找到下面配置,取消注释,并保持与下面配置一致
      ‘‘‘
      PermitRootLogin yes
      PasswordAuthentication yes
      ‘‘‘
    • 重启服务:
      # service ssh restart
      # service ssh status  【查看状态】

Kali linux 配置静态网络与开启SSH服务

原文:https://www.cnblogs.com/lich1x/p/13913426.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!