步骤
- 注册 AWS,创建 Ubuntu 18 实例
- 连接:
ssh -i "xx.pem" ubuntu@ec2-xxx.compute.amazonaws.com - 修改 SSH 配置,启用密码登录并更改端口
- 安装必要软件
sudo vim /etc/ssh/sshd_config
# Port 22 → Port 1234
# PasswordAuthentication no → yes
passwd ubuntu
service ssh restart ssh -i "xx.pem" ubuntu@ec2-xxx.compute.amazonaws.comsudo vim /etc/ssh/sshd_config
# Port 22 → Port 1234
# PasswordAuthentication no → yes
passwd ubuntu
service ssh restart