版权声明:版权开放,任意转载!~~ https://blog.csdn.net/donghaiming111/article/details/80853703
问题描述:
亚马逊云服务器ubuntu 16.04开启之后默认用户名为ubuntu
但是只能使用创建服务器时生成的pem密钥文件登陆,部分
运维人员不太习惯这种登录方式,按照下面的操作可以调整
为使用密码登录的方式。
反向操作请参考另一篇文章
https://blog.csdn.net/donghaiming111/article/details/80854223
创建新用户
sudo adduser xxx
开启root用户
sudo passwd root
允许使用密码登录
vim /etc/ssh/sshd_config
## 将下面的 no 改为 yes 可使用/搜索
PasswordAuthentication no
# 重启ssd
sudo /etc/init.d/ssh restart