
vi /etc/ssh/sshd_config

```conf
Port 60022 #这里修改为你想要设置的端口，以 60022 为例
# 启用密钥验证
PubkeyAuthentication yes
# 禁用密码验证
PasswordAuthentication no
# 禁用 root 登陆
PermitRootLogin no
```

service sshd restart

