1,配置公网IP
编辑网卡配置:/etc/network/interfaces

# IPv4 静态
iface ens3 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 223.5.5.5
# IPv6 自动获取
iface ens3 inet6 auto
systemctl restart networking

2,配置apt源
编辑 /etc/apt/sources.list

deb http://ftp.jp.debian.org/debian trixie main contrib non-free non-free-firmware
deb-src http://ftp.jp.debian.org/debian trixie main contrib non-free non-free-firmware
deb http://ftp.jp.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb-src http://ftp.jp.debian.org/debian trixie-updates main contrib non-free non-free-firmware
deb http://ftp.jp.debian.org/debian trixie-backports main contrib non-free non-free-firmware
deb-src http://ftp.jp.debian.org/debian trixie-backports main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware

apt clean
apt autoclean
apt updateapt upgrade(升级)

3,安装ssh
apt install -y openssh-server
systemctl enable –now ssh

修改配置文件/etc/ssh/sshd_config

Port 22
PermitRootLogin yes
PasswordAuthentication yes
PubkeyAuthentication yes

完毕