[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Authentication problem
[Thread Prev] | [Thread Next]
- Subject: Authentication problem
- From: Pierre-Yves Fontaniere <pyf@xxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 03 Mar 2011 14:42:57 +0100
- To: libssh@xxxxxxxxxx
Hello ... I'm trying to use libssh0.4.8 on AIX6.1 and have a problem with public key authentication.
My program simply : - Initialize a session. - Verify the remote server/key matching. - Test if pubkey authentication is ok for the remote server. - Create a private key from the file. - Calculate public key from the private key. - Offer this pubkey to the remote server. - Try to authenticate with this pubkey. And it failed here. After a call to :rc = ssh_userauth_offer_pubkey(my_ssh_session, username, privkey_type, pubkey_string);
rc is SSH_AUTH_SUCCESS. But just after when i try : rc = ssh_userauth_pubkey(my_ssh_session,username, pubkey_string, privkey); rc is SSH_AUTH_ERROR Of course when i try to use ssh to this remote server i can connect.I attached a libssh_trace log part (from the start to the end of ssh_userauth_pubkey call) if it can help.
Any ideas ? Thanks for all Pierre-yves
[func] entering function ssh_userauth_pubkey line 445 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/auth.c [func] entering function ask_userauth line 52 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/auth.c [func] leaving function ask_userauth line 62 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/auth.c [func] entering function packet_send2 line 472 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [3] Writing on the wire a packet having 606 bytes before [3] 606 bytes after comp + 13 padding bytes = 620 bytes packet [3] Encrypting packet with seq num: 6, len: 624 [func] entering function packet_write line 450 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function ssh_socket_write line 367 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_write line 379 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_blocking_flush line 606 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_completewrite line 312 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_completewrite line 329 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_blocking_flush line 643 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function packet_write line 458 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] leaving function packet_send2 line 533 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function wait_auth_status line 73 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/auth.c [func] entering function packet_read2 line 71 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Decrypting 16 bytes [3] Packet size decrypted: 44 (0x2c) [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Read a 44 bytes packet [3] Decrypting 32 bytes [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] 8 bytes padding, 43 bytes left in buffer [3] After padding, 35 bytes left in buffer [func] leaving function packet_read2 line 230 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_translate line 405 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [3] Final size 35 [3] Type 4 [func] leaving function packet_translate line 425 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_read2 line 71 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Decrypting 16 bytes [3] Packet size decrypted: 44 (0x2c) [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Read a 44 bytes packet [3] Decrypting 32 bytes [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] 9 bytes padding, 43 bytes left in buffer [3] After padding, 34 bytes left in buffer [func] leaving function packet_read2 line 230 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_translate line 405 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [3] Final size 34 [3] Type 4 [func] leaving function packet_translate line 425 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_read2 line 71 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Decrypting 16 bytes [3] Packet size decrypted: 44 (0x2c) [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Read a 44 bytes packet [3] Decrypting 32 bytes [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] 7 bytes padding, 43 bytes left in buffer [3] After padding, 36 bytes left in buffer [func] leaving function packet_read2 line 230 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_translate line 405 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [3] Final size 36 [3] Type 4 [func] leaving function packet_translate line 425 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_read2 line 71 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Decrypting 16 bytes [3] Packet size decrypted: 92 (0x5c) [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Read a 92 bytes packet [3] Decrypting 80 bytes [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] 17 bytes padding, 91 bytes left in buffer [3] After padding, 74 bytes left in buffer [func] leaving function packet_read2 line 230 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_translate line 405 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [3] Final size 74 [3] Type 4 [func] leaving function packet_translate line 425 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function packet_read2 line 71 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Decrypting 16 bytes [3] Packet size decrypted: 12 (0xc) [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 438 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_read line 342 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] entering function ssh_socket_wait_for_data line 401 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_wait_for_data line 406 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [func] leaving function ssh_socket_read line 353 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/socket.c [3] Read a 12 bytes packet [func] leaving function packet_read2 line 239 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/packet.c [func] leaving function wait_auth_status line 169 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/auth.c [func] leaving function ssh_userauth_pubkey line 519 in /opt/freeware/src/packages/BUILD/libssh-0.4.8/libssh/auth.c
Re: Authentication problem | Pierre-Yves Fontaniere <pyf@xxxxxxxxxxx> |