Permission denied (publickey) when I ssh out but no problems the other way around

24 views
Skip to first unread message

Mauricio Tavares

unread,
Oct 4, 2010, 4:33:24 PM10/4/10
to opens...@googlegroups.com
let's say I have openssh-lpk in two linux boxes, linux1 and linux2. If I

linux1> ssh linux2
linux2>

But if I go the other way around,

linux2> ssh linux1
Permission denied (publickey).
linux2>

I am using the same LDAP account in both machines. Why wouldn't it be
able to get the keys in linux2 when I try to ssh to linux1? using
ldapsearch in linux2 I can see the sshPublicKey, so I do not think it is
a LDAP issue.

I do not know if it helps any but here is the ldd for ssh in linux2:

linux2> ldd `which ssh`
linux-vdso.so.1 => (0x00007fff341cc000)
libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007fa6da038000)
libz.so.1 => /lib/libz.so.1 (0x00007fa6d9e21000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00007fa6d9c07000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2
(0x00007fa6d99d3000)
libc.so.6 => /lib/libc.so.6 (0x00007fa6d9650000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fa6d944b000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007fa6d9187000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007fa6d8f61000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x00007fa6d8d5c000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0
(0x00007fa6d8b54000)
libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00007fa6d8951000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa6da626000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa6d8733000)
linux2>

For some reason I expected to find libldap there, as I do in sshd. But
maybe I am reading between the lines too much. ;)

Tony G.

unread,
Oct 5, 2010, 2:15:35 PM10/5/10
to opens...@googlegroups.com
Mauricio,

On Mon, Oct 4, 2010 at 3:33 PM, Mauricio Tavares <raub...@gmail.com> wrote:
       let's say I have openssh-lpk in two linux boxes, linux1 and linux2. If I

linux1> ssh linux2
linux2>

But if I go the other way around,

linux2> ssh linux1
Permission denied (publickey).
linux2>

You need to have your private keys in linux2 to be able to connect to 1.


I am using the same LDAP account in both machines. Why wouldn't it be able to get the keys in linux2 when I try to ssh to linux1? using ldapsearch in linux2 I can see the sshPublicKey, so I do not think it is a LDAP issue.

I do not know if it helps any but here is the ldd for ssh in linux2:

linux2>  ldd `which ssh`
       linux-vdso.so.1 =>  (0x00007fff341cc000)
       libcrypto.so.0.9.8 => /lib/libcrypto.so.0.9.8 (0x00007fa6da038000)
       libz.so.1 => /lib/libz.so.1 (0x00007fa6d9e21000)
       libresolv.so.2 => /lib/libresolv.so.2 (0x00007fa6d9c07000)
       libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007fa6d99d3000)
       libc.so.6 => /lib/libc.so.6 (0x00007fa6d9650000)
       libdl.so.2 => /lib/libdl.so.2 (0x00007fa6d944b000)
       libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007fa6d9187000)
       libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007fa6d8f61000)
       libcom_err.so.2 => /lib/libcom_err.so.2 (0x00007fa6d8d5c000)
       libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007fa6d8b54000)
       libkeyutils.so.1 => /lib/libkeyutils.so.1 (0x00007fa6d8951000)
       /lib64/ld-linux-x86-64.so.2 (0x00007fa6da626000)
       libpthread.so.0 => /lib/libpthread.so.0 (0x00007fa6d8733000)
linux2>

For some reason I expected to find libldap there, as I do in sshd. But maybe I am reading between the lines too much. ;)

--
You received this message because you are subscribed to the Google Groups "openssh-lpk" group.
To post to this group, send email to opens...@googlegroups.com.
To unsubscribe from this group, send email to openssh-lpk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openssh-lpk?hl=en.




--
Tony
http://blog.tonyskapunk.net

SJ

unread,
Oct 8, 2010, 6:57:09 PM10/8/10
to openssh-lpk
Will help if you can post sshd_config and /etc/ldap.conf from both
machines.

Are both machines running the same distribution and patch level?
Reply all
Reply to author
Forward
0 new messages