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

6,079次阅读
没有评论

其实方法是和甲骨文的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的方法

 

 

 

正文完
 0
评论(没有评论)