我有一个新的RHEL4
Linux盒子,用于将数据复制到带有scp的旧Solaris 2.6和RHEL3 Linux盒子.我发现使用相同的设置,它适用于某些用户,但不适用于其他用户.对于用户jane,这很好用:
jane @ host1 $ssh -v remhost
debug1: Next authentication method: publickey debug1: Trying private key: /mnt/home/osborjo/.ssh/identity debug1: Offering public key: /mnt/home/osborjo/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 277 debug1: read PEM private key done: type RSA debug1: Authentication succeeded (publickey).
对于用户杰克它不:
jack @ host1 ssh -v remhost
debug1: Next authentication method: publickey debug1: Trying private key: /mnt/home/oper1/.ssh/identity debug1: Offering public key: /mnt/home/oper1/.ssh/id_rsa debug1: Authentications that can continue: publickey,password,keyboard-interactive
我查看了所有密钥和文件的权限,它们看起来一样.由于我使用的是NFS挂载的主目录,因此远程主机和本地主机的密钥位于同一目录中.这就是事情寻找简的方式:
jane @ host1 $ls -l $HOME / .ssh
-rw-rw-r-- 1 jane operator 394 Jan 27 16:28 authorized_keys -rw------- 1 jane operator 1675 Jan 27 16:27 id_rsa -rw-r--r-- 1 jane operator 394 Jan 27 16:27 id_rsa.pub -rw-rw-r-- 1 jane operator 1205 Jan 27 16:46 known_hosts
对于用户插孔:
jack @ host1 $ls -l $HOME / .ssh
-rw-rw-r-- 1 jack engineer 394 Jan 27 16:28 authorized_keys -rw------- 1 jack engineer 1675 Jan 27 16:27 id_rsa -rw-r--r-- 1 jack engineer 394 Jan 27 16:27 id_rsa.pub -rw-rw-r-- 1 jack engineer 1205 Jan 27 16:46 known_hosts
作为最后的努力,我将authorized_keys,id_rsa和id_rsa.pub从jill复制到jack,并使用vi更改了authorized_keys和id_rsa.pub中的用户名.它仍然无法正常工作.似乎两个用户之间有一些不同,但我无法弄清楚它是什么.