日记男孩的博客

亚马逊云 Aws 使用密码方式登录SSH的方法

其实方法是和甲骨文的VPS是一样的,具体可以看这篇文章:

甲骨文的主机使用ssh账号密码登陆的方法

首先使用密钥登录SSH软件,

接着输入 Sudo -i ,换成超级管理员权限,我这里用的是Debian的操作系统演示:

接着输入这如下的代码:

echo root:YourPasswordHere |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart

将以上代码中的  root:YourPasswordHere  , root后面改成你想要的密码即可。

这样就可以改为密码登录了。

如图:

 

 

 

转载请注明:日记男孩的博客 » 亚马逊云 Aws 使用密码方式登录SSH的方法

赞赏

微信赞赏支付宝赞赏

退出移动版