由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Linux版 - rsa public key
相关主题
ssh的key验证在一般用户下无效请教如何更改启动时的默认目录?
Virtualbox怎么越来越慢了问个关于user/group的粗浅问题
问一个linux下程序编译和运行的问题fedora (14) root 用户没有声音
did you pass the leap second without problem?mail server setup
virtualbox跟native比,差多少 (转载)strange behavior about chmod 777 -R
fstab里面users和uid,gid不能一起用吗?VFS: Unable to mount root fs via NFS, trying floppy.
what's wrong with yum&chinese locale?改密码的问题
再问一遍!Xorg的分辨率可以是不同用户不同分辨率?How not to use password for ssh connections
相关话题的讨论汇总
话题: keys话题: authorized话题: ssh话题: user2话题: key
进入Linux版参与讨论
1 (共1页)
p******g
发帖数: 347
1
This is really driving me crazy.
I am trying rsa public key to login to difference users in a remote RHEL6
box.
I created the rsa key in my local ubuntu box. I use ssh-copy-id to copy the
pub key to different users on the remove servers.
The pub key works for user1, but not for user2. On REHL6 box I copied the /home/user1/.
ssh/authorized_keys to /home/user2/.ssh/authorized_keys, then my local pc's
rsa key works for user2@RHEL6.
But the two authorized_keys are identical.
Here's it:
-bash-4.1$ ls -l
total 8
-rw-------. 1 svn svn 793 Feb 17 00:22 authorized_keys
-rw-------. 1 svn svn 793 Feb 16 22:11 authorized_keys.not
-bash-4.1$ diff authorized_keys authorized_keys.not
WHY!? any suggestions.
And once I make the copy, I can ssh-copy-id from other users on other boxes
to append more pub keys in user2 (svn)'s authorized_keys, no more problems.
And I copied the working authorized keys to /root/.ssh/, hoping it will work
for root@REHL6, but it doesn't. I still have to use the root password to
login... Tried to turn on ssh -vvv and sshd debug log, but it just shows the
key was not accepted by the REHL6 server. No further useful info.
m******n
发帖数: 1691
2
because you copy authorized_keys to authorized_keys.not
so, they are identical. That's easy.

the
/home/user1/.
s

【在 p******g 的大作中提到】
: This is really driving me crazy.
: I am trying rsa public key to login to difference users in a remote RHEL6
: box.
: I created the rsa key in my local ubuntu box. I use ssh-copy-id to copy the
: pub key to different users on the remove servers.
: The pub key works for user1, but not for user2. On REHL6 box I copied the /home/user1/.
: ssh/authorized_keys to /home/user2/.ssh/authorized_keys, then my local pc's
: rsa key works for user2@RHEL6.
: But the two authorized_keys are identical.
: Here's it:

r****n
发帖数: 1088
3
check the owner group and user of authroized_keys?

the
/home/user1/.
s

【在 p******g 的大作中提到】
: This is really driving me crazy.
: I am trying rsa public key to login to difference users in a remote RHEL6
: box.
: I created the rsa key in my local ubuntu box. I use ssh-copy-id to copy the
: pub key to different users on the remove servers.
: The pub key works for user1, but not for user2. On REHL6 box I copied the /home/user1/.
: ssh/authorized_keys to /home/user2/.ssh/authorized_keys, then my local pc's
: rsa key works for user2@RHEL6.
: But the two authorized_keys are identical.
: Here's it:

p******g
发帖数: 347
4
no. i moved the original user2's authorized_keys to authorized_keys.not
before i copied the one from user1 over.
if i copy authorized_keys.not authorized_keys for user2, public key login
will fail again even though the two files are identical and have the same
ownership and access mode...
this is really weird...
v*****r
发帖数: 1119
5
redken is right. This is caused by file/dir permission setting.
Same reason for your root access, run this in root home to fix the issue:
chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys

【在 p******g 的大作中提到】
: no. i moved the original user2's authorized_keys to authorized_keys.not
: before i copied the one from user1 over.
: if i copy authorized_keys.not authorized_keys for user2, public key login
: will fail again even though the two files are identical and have the same
: ownership and access mode...
: this is really weird...

p******g
发帖数: 347
6
I've done this already. it's not working.
As you can see, the two authorized_keys are identical, has the same owner:
group and same mode, and they are in the same path. one works and the other
one doesn't...

【在 v*****r 的大作中提到】
: redken is right. This is caused by file/dir permission setting.
: Same reason for your root access, run this in root home to fix the issue:
: chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys

E*V
发帖数: 17544
7
ssh -vv

other

【在 p******g 的大作中提到】
: I've done this already. it's not working.
: As you can see, the two authorized_keys are identical, has the same owner:
: group and same mode, and they are in the same path. one works and the other
: one doesn't...

p******g
发帖数: 347
8
i've done ssh -vvv, i turned on the ssd config debug as well. can't tell
what's the difference... will post the logs later.

【在 E*V 的大作中提到】
: ssh -vv
:
: other

1 (共1页)
进入Linux版参与讨论
相关主题
How not to use password for ssh connectionsvirtualbox跟native比,差多少 (转载)
ssh 自动断开的问题fstab里面users和uid,gid不能一起用吗?
【问题】ssh不能以root远程登录what's wrong with yum&chinese locale?
问个TCP有关timeout的技术问题再问一遍!Xorg的分辨率可以是不同用户不同分辨率?
ssh的key验证在一般用户下无效请教如何更改启动时的默认目录?
Virtualbox怎么越来越慢了问个关于user/group的粗浅问题
问一个linux下程序编译和运行的问题fedora (14) root 用户没有声音
did you pass the leap second without problem?mail server setup
相关话题的讨论汇总
话题: keys话题: authorized话题: ssh话题: user2话题: key