最新消息:

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

VPS服务器推荐 admin 3519浏览 0评论

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

赞赏

微信赞赏支付宝赞赏

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址