论坛风格切换切换到宽版
  • 1140阅读
  • 2回复

[问题求助]请教用openssh登录时出现的:Permission denied (publickey) [复制链接]

上一主题 下一主题
离线chaoran898.
 
发帖
2053
C币
-60843
威望
358
贡献值
1
银元
0
铜钱
4539
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
我的openssh版本号:

[root@localhost ssh].# rpm -.qa openssh    健康
openssh-3.5p1.-6.

[root@localhos.t ssh]# rpm. -qa |grep openssh投资
open.ssh-3.5p1-6.
openssh-server-.3.5p1-6--------------彩票
openssh-askpass-gnome.-3.5p1-6..
open.ssh-clients-3.5p1-6外贸
openssh-askpass-3.5p.1-6.

我实验中的环境: 服务端和客.户端都是同一台pc.          婚庆

下面是我做的东.西和出现的问题:.

[root@localhos.t. .ssh]# ssh-keygen -d            杀毒
G.enerating public/private dsa ke.y pair..
Enter file in which to save the key (/root/.ssh/id_dsa): /home/admin/.s.sh/id_dsaEn.ter passphrase (empty for no passph.rase):    美容
E.nter same. passphrase again:.
Your identification has .been saved in /hom.e/admin/.ssh/id_dsa..
Your public key has been saved .in /home/admin/.ssh/id._dsa.pub.    健康
The key f.ingerprint is:.
5c:70:4f:b5:06:b2:b3:.25:.d0:e9:91:b3:00:4a:c1:63 root@localhost.localdomain           女人
[root@localhost .ss.h]# ls.
id_dsa . id_dsa.pub[成人用品]
[root@l.ocalhost .ssh]# mv id_dsa..pub authorized_key投资
[root@localhost .ssh]# chmod 644 a.uthorize.d_key.
[root@localhost .ssh].# /etc/rc.d/init.d./sshd restart.
停止 sshd:.                  .                              [  确定  ].
启动 sshd                                 .                 [  确定 . ]投资
[root@localhost .ssh]# ssh -l admin lo.calhos.t    外汇
Permission denied (publick.ey)..

我在/etc/ssh/sshd_conf..ig所做的修改:           建材
P.asswordAuthentication no.
Cha.llengeRe.sponseAuthentication no          婚庆

请高手们指点, 小弟正在.做毕业设.计, 希望得到好心人士的帮忙, 谢谢!电影

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线dylanok.
发帖
2098
C币
-60666
威望
362
贡献值
1
银元
-3
铜钱
4752
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-13
Re:请教用openssh登录时出现的:Permission
顶一下,希望有人懂可以回答我, 搞了几天了, 今天得到的结果是Permission denied (). 然后跑到 www.openssh.com去查找了一下, 看到类似的东西, 按着提示的东西弄了一下, 结果滔声依旧.

3.14 - I copied my public key to authorized_keys but public-key authentication still doesn't work.

Typically this is caused by the file permissions on $HOME, $HOME/.ssh or $HOME/.ssh/authorized_keys being more permissive than sshd allows by default.

In this case, it can be solved by executing the following on the server.

    $ chmod go-w $HOME $HOME/.ssh
    $ chmod 600 $HOME/.ssh/authorized_keys

If this is not possible for some reason, an alternative is to set StrictModes no in sshd_config, however this is not recommended.

离线pkx520.
发帖
2006
C币
-235498
威望
354
贡献值
1
银元
-4
铜钱
4577
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-13
Re:请教用openssh登录时出现的:Permission
今天遇到同样问题,经过一番努力,发现是publickey的目录没有配置好
快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个