要求输入密码时没有密码 [英] Asking for password when there is no password

查看:139
本文介绍了要求输入密码时没有密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台机器在AWS EC2平台。它是一种Linux平台,与没有密码的名为root用户,

I have a machine in AWS EC2 platform. Its a linux platform, with the user named root having no password,

现在我必须设置,SSH密钥验证这台机器上,为此首先,我安装了Cygwin,那么我也跟着下面的步骤:

Now I have to setup, ssh key authentication on this machine, For that firstly, I installed cygwin, then I followed the following steps :

 1. ssh-keygen -t dsa -f ~/.ssh/<key name> -C "root@<ip>"
 2. cat ~/.ssh/<key name>.pub | ssh  root@<ip> "cat >> ~/.ssh/authorized_keys"

现在,当我这样做,它要求密码,但用户从来没有设置任何密码的

Now, when I do this, it asks for password, but I never setup any password on the user root.

另外,如果我不提供密码,它说,访问被拒绝!

Also if I does not supply password, it says access denied!!!

问题出在哪里?

推荐答案

检查的权限在的〜/ .ssh / authorized_keys中他们需要的是 600 ,并在的〜/ .ssh 目录中,他们需要的是 700

Check the permissions on your ~/.ssh/authorized_keys they need to be 600 and also on the ~/.ssh directory, they need to be 700.

你也可以运行你的腰带客户端与 -vvv 选项以获取调试信息。

Also you can run your sash client with the -vvv option to get debug information.

这篇关于要求输入密码时没有密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆