Riguz留言 | 贡献
Riguz留言 | 贡献
第24行: 第24行:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
ssh-copy-id -p 50000 root@12.98.23.12
ssh-copy-id -p 50000 ubuntu@12.98.23.12


# vim /etc/ssh/sshd_config
# vim /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
PubkeyAuthentication yes



2025年10月5日 (日) 05:27的版本

System settings

Update system

sudo apt update
sudo apt upgrade
do-release-upgrade

reboot

hostname

vim /etc/hostname

user

adduser ubuntu
usermod -aG sudo ubuntu

ssh config

ssh-copy-id -p 50000 ubuntu@12.98.23.12

# vim /etc/ssh/sshd_config
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes

service ssh restart
ssh -p 50000 root@12.98.23.12