当前位置:   article > 正文

Kali 修改IP地址和DNS 开启SSH和远程桌面_kali修改ip地址

kali修改ip地址
一、修和IP和DNS

1、打开配置文件

  1. vim /etc/network/interfaces
  2. # 加入
  3. auto eth0
  4. iface eth0 inet static
  5. address 10.3.0.231
  6. netmask 255.255.255.0
  7. gateway 10.3.0.1

 2、清空网卡配置

ip addr flush dev eth0

3、配置DNS

  1. vim /etc/resolv.conf
  2. nameserver 114.114.114.114

4、重启网络

systemctl restart networking
二、开启SSH

1、打开配置文件

  1. vim /etc/ssh/sshd_config
  2. # 第57行,开启
  3. PasswordAuthentication yes
  4. # 如果你还想开启 root 登陆,修改第 53 行
  5. PermitRootLogin yes

2、重启

systemctl restart ssh
三、开启远桌桌面

1、安装 

apt install xrdp -y

2、远程

这里用的账号不能在其它地方有远程桌面登陆,否则会出现闪退的情况 

3、解决在 Xshell 中 vim 不能右键复制粘贴的问题

  1. vim /usr/share/vim/vim90/defaults.vim
  2. " In many terminal emulators the mouse works just fine. By enabling it you
  3. " can position the cursor, Visually select and scroll with the mouse.
  4. " Only xterm can grab the mouse events when using the shift key, for other
  5. " terminals use ":", select text and press Esc.
  6. if has('mouse')
  7. if &term =~ 'xterm'
  8. "set mouse=a # 第83行修改
  9. set mouse=v
  10. else
  11. set mouse=nvi
  12. endif
  13. endif

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/寸_铁/article/detail/1021504
推荐阅读
相关标签
  

闽ICP备14008679号