ssh做不用密码的连接,为什么每次都要密码呢?高手看看

xyzhh 2006-08-24 04:24:40
在AS4(u3)上做的,自己连自己,全过程如下(在u1版上这样做一点问题也没有啊),到最后还要密码,晕死了,高手看看给吧。
[root@ora1 etc]# su - oracle
[oracle@ora1 ~]$ cd .ssh
[oracle@ora1 .ssh]$ rm * -f
[oracle@ora1 .ssh]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
4e:1c:dc:e1:ff:a1:72:31:6e:67:d9:2e:17:0e:2e:47 oracle@ora1
[oracle@ora1 .ssh]$ ls
id_dsa id_dsa.pub
[oracle@ora1 .ssh]$ cat id_dsa.pub >authorized_keys
[oracle@ora1 .ssh]$ chmod 644 authorized_keys
[oracle@ora1 .ssh]$ ll -a ..|grep ssh
drwx------ 2 oracle oracle 4096 Aug 24 16:20 .ssh
[oracle@ora1 .ssh]$ ll
total 24
-rw-r--r-- 1 oracle oracle 601 Aug 24 16:20 authorized_keys
-rw------- 1 oracle oracle 672 Aug 24 16:19 id_dsa
-rw-r--r-- 1 oracle oracle 601 Aug 24 16:19 id_dsa.pub
[oracle@ora1 .ssh]$ hostname
ora1
[oracle@ora1 .ssh]$ ssh ora1
The authenticity of host 'ora1 (192.168.100.11)' can't be established.
RSA key fingerprint is d3:cc:bf:18:c4:bf:0b:b1:64:97:b5:c4:12:56:40:4a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'ora1,192.168.100.11' (RSA) to the list of known hosts.
oracle@ora1's password:
Last login: Thu Aug 24 13:53:51 2006 from pvt2
[oracle@ora1 ~]$ exit
logout
Connection to ora1 closed.
[oracle@ora1 .ssh]$ ssh ora1
oracle@ora1's password:
...全文
348 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
mayabin 2006-08-24
  • 打赏
  • 举报
回复
/etc/ssh/sshd-config里的要求rsa密钥登陆,你做yes设置了吗?

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧