一、修和IP和DNS
1、打开配置文件
vim /etc/network/interfaces
# 加入
auto eth0
iface eth0 inet static
address 10.3.0.231
netmask 255.255.255.0
gateway 10.3.0.1
2、清空网卡配置
ip addr flush dev eth0
3、配置DNS
vim /etc/resolv.conf
nameserver 114.114.114.114
4、重启网络
systemctl restart networking
二、开启SSH
1、打开配置文件
vim /etc/ssh/sshd_config
# 第57行,开启
PasswordAuthentication yes
# 如果你还想开启 root 登陆,修改第 53 行
PermitRootLogin yes
2、重启
systemctl restart ssh
三、开启远桌桌面
1、安装
apt install xrdp -y
2、远程
这里用的账号不能在其它地方有远程桌面登陆,否则会出现闪退的情况
3、解决在 Xshell 中 vim 不能右键复制粘贴的问题
vim /usr/share/vim/vim90/defaults.vim
" In many terminal emulators the mouse works just fine. By enabling it you
" can position the cursor, Visually select and scroll with the mouse.
" Only xterm can grab the mouse events when using the shift key, for other
" terminals use ":", select text and press Esc.
if has('mouse')
if &term =~ 'xterm'
"set mouse=a # 第83行修改
set mouse=v
else
set mouse=nvi
endif
endif