- Changing the root password
sudo passwd root
- Set the root can remotely log
The default without ssh, ssh so you need to install it
sudo apt install openssh-server
Allow root user login, edit sshd_config
sudo vim /etc/ssh/sshd_config Found under item # Authentication PermitRootLogin prohibit-password改成PermitRootLogin yes
Get ssh restart
sudo systemctl restart sshd
- Replace domestic sources
Backup
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
Edit /etc/apt/sources.list to replace Ali source
Ali source deb http: // mirrors.aliyun.com/ubuntu/ great main deb-src http: // mirrors.aliyun.com/ubuntu/ great main deb http: // mirrors.aliyun.com/ubuntu/ great-updates main deb -SR http: // mirrors.aliyun.com/ubuntu/ great-updates main deb http: // mirrors.aliyun.com/ubuntu/ great universe deb-src http: // mirrors.aliyun.com/ubuntu/ great universe deb http: // mirrors.aliyun.com/ubuntu/ great-updates universe deb-src http: // mirrors.aliyun.com/ubuntu/ great-updates universe deb http: //mirrors.aliyun.com/ubuntu/ great-security main deb-src http: // mirrors.aliyun.com/ubuntu/ great-security main deb http: // mirrors.aliyun.com/ubuntu/ great-security universe Deb src http: // mirrors.aliyun.com/ubuntu/ great-security universe
Update fixes package
apt-get -f install apt-get upgrade
According to the card number edit /etc/netplan/50-cloud-init.yaml set static ip I have here is ens33
network: ethernets: ens33: addresses: [192.168.3.244/24, ] dhcp4: no dhcp6: no gateway4: 192.168.3.1 nameservers: addresses: [8.8.8.8, 9.9.9.9] version: 2
Effective immediately
netplan apply