启用SSH,并启用远程root登录
设置root密码:sudo passwd root
启用root的ssh登录:vi /etc/ssh/sshd_config;
添加PermitRootLogin yes;
重启SSD服务systemctl restart sshd
如果ssh服务未开启,则要开启ssh服务:sudo systemctl enable ssh
重启SSH服务:systemctl restart ssh
客户端清除ssh证书信息:ssh-keygen -R *.*.*.*
网络配置修改
没有NetworkManager需要安装:sudo apt install network-manager
启用NetworkManager:
vi /etc/NetworkManager/NetworkManager.conf
修改managed=false为managed=true
使用NetworkManager管理网络:
vi /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
version: 2
renderer: NetworkManager
配置IP
nmcli connection add con-name ens33 ifname ens33 type ethernet ipv4.method manual ipv4.addresses 192.168.91.30/24 ipv4.gateway 192.168.91.2 ipv4.dns 114.114.114.114 autoconnect yes
应用配置
netplan apply & systemctl restart NetworkManager
或者直接重启reboot