ssh authentication issue
Appreciate if any expert able to help me out. I have been checking all ssh sites and forums but still not able to solve this problem.
I have setup a cronjob in server A to run scp command through user 1 and it's working fine. Authentication method used was RSA and without passphrase.
However when I tried to use scp command to copy files from/to another user in same remote server, it keeps prompt for password. I have copied user1's public key to authorized_keys in user2 in remote server.
user1 in server A connect to user3 in server B --> connected without prompting for password
user1 in server A connect to user2 in server B --> keeps prompt for password
Here is the debug code when I run ssh command to connect to user2:
$ ssh -p 32 -v user2@<ip_address>
SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0.
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: getuid 1052 geteuid 1052 anon 1
debug1: Connecting to <ip address> [ip address] port 32.
debug1: Connection established.
debug1: identity file /export/home/user1/.ssh/identity type 3
debug1: Bad RSA1 key file /export/home/user1/.ssh/id_rsa.
debug1: identity file /export/home/user1/.ssh/id_rsa type 3
debug1: identity file /export/home/user1/.ssh/id_dsa type 3
debug1: Remote protocol version 2.0, remote software version Sun_SSH_1.1
debug1: no match: Sun_SSH_1.1
Enabling compatibility modefor protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.0
debug1: sent kexinit: diffie-hellman-group1-sha1
debug1: sent kexinit: ssh-rsa,ssh-dss
debug1: sent kexinit: aes128-cbc,blowfish-cbc,3des-cbc,rijndael128-cbc
debug1: sent kexinit: aes128-cbc,blowfish-cbc,3des-cbc,rijndael128-cbc
debug1: sent kexinit: hmac-sha1,hmac-md5
debug1: sent kexinit: hmac-sha1,hmac-md5
debug1: sent kexinit: none
debug1: sent kexinit: none
debug1: sent kexinit:
debug1: sent kexinit:
debug1: send KEXINIT
debug1: done
debug1: wait KEXINIT
debug1: got kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug1: got kexinit: ssh-rsa,ssh-dss
debug1: got kexinit: aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc
debug1: got kexinit: aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc
debug1: got kexinit: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96
debug1: got kexinit: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96
debug1: got kexinit: none,zlib
debug1: got kexinit: none,zlib
debug1: got kexinit: C,POSIX
debug1: got kexinit: C,POSIX
debug1: first kex follow: 0
debug1: reserved: 0
debug1: done
debug1: kex: server->client unable to decide common locale
debug1: kex: server->client aes128-cbc hmac-sha1 none
debug1: kex: client->server unable to decide common locale
debug1: kex: client->server aes128-cbc hmac-sha1 none
debug1: Sending SSH2_MSG_KEXDH_INIT.
debug1: bits set: 508/1024
debug1: Wait SSH2_MSG_KEXDH_REPLY.
debug1: Got SSH2_MSG_KEXDH_REPLY.
debug1: Host'<ip address>' is known and matches the RSA host key.
debug1: Found key in /export/home/user1/.ssh/known_hosts:1
debug1: bits set: 518/1024
debug1: ssh_rsa_verify: signature correct
debug1: Wait SSH2_MSG_NEWKEYS.
debug1: GOT SSH2_MSG_NEWKEYS.
debug1: send SSH2_MSG_NEWKEYS.
debug1: done: send SSH2_MSG_NEWKEYS.
debug1: done: KEX2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that cancontinue: gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive
debug1: next auth method totry is publickey
debug1: key does not exist: /export/home/user1/.ssh/identity
debug1:try pubkey: /export/home/user1/.ssh/id_rsa
debug1: read SSH2private key done: name rsa w/o comment success 1
debug1: authentications that cancontinue: gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive
debug1: next auth method totry is publickey
debug1: key does not exist: /export/home/user1/.ssh/id_dsa
debug1: next auth method totry is password
user2@<ip address>'s password:
Thanks in advance for spending time on this.

