AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  why sftp prompting password ?

    Posted Mon December 07, 2009 05:28 PM

    Originally posted by: chandru0078


    Hi experts
    I have node server A(sun) server B(AIX). I try configure sftp so both this can communicate with prompting password.
    So I generate rsa key at server B(aix) then copy the id_rsa_pub content by ftp id_rsa.pub file from server B to server A followed by cat id_rsa.pub >> authorized_keys. after testing sftp from server B to A working fine with needed to enter password. Server A to B prompting to enter password. I tried many way like using dsa key but all not success. Please help where is the mistake
    A to B (having problem)

    A#sftp -v B
    Connecting to B...
    OpenSSH_3.9p1, OpenSSL 0.9.7d 17 Mar 2004
    debug1: Connecting to B http://12.12.12.12 port 22.
    debug1: Connection established.
    debug1: identity file /export/home/vzqnqn/.ssh/id_rsa type 1
    debug1: identity file /export/home/vzqnqn/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
    debug1: match: OpenSSH_3.9p1 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_3.9p1
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Host 'B' is known and matches the RSA host key.
    debug1: Found key in /export/home/vzqnqn/.ssh/known_hosts:6
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Offering public key: /export/home/vzqnqn/.ssh/id_rsa
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Trying private key: /export/home/vzqnqn/.ssh/id_dsa
    debug1: Next authentication method: keyboard-interactive
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: password
    B to A wworking fine

    B:/Net/zzmanumgr/.ssh $ sftp -v A
    Connecting to A...
    OpenSSH_3.9p1, OpenSSL 0.9.6g 9 Aug 2002
    debug1: Reading configuration data /usr/local/etc/ssh_config
    debug1: Connecting to A http://123.12.12.78 port 22.
    debug1: Connection established.
    debug1: identity file /Net/z/manumgr/.ssh/id_rsa type 1
    debug1: identity file /Net/zz/manumgr/.ssh/id_dsa type -1
    debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
    debug1: match: OpenSSH_3.9p1 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_3.9p1
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug1: Host 'A' is known and matches the RSA host key.
    debug1: Found key in /Net/zz/manumgr/.ssh/known_hosts:1
    debug1: ssh_rsa_verify: signature correct
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password,keyboard-interactive
    debug1: Next authentication method: publickey
    debug1: Offering public key: /Net/zzz/manumgr/.ssh/id_rsa
    debug1: Server accepts key: pkalg ssh-rsa blen 149
    debug1: read PEM private key done: type RSA
    debug1: Authentication succeeded (publickey).
    debug1: channel 0: new client-session
    debug1: Entering interactive session.
    debug1: Sending subsystem: sftp
    sftp>


  • 2.  Re: why sftp prompting password ?

    Posted Tue December 08, 2009 09:07 PM

    Originally posted by: SystemAdmin


    You have the right idea; but, the transfer of a public key to a host only permits passwordless login to that host, it does not grant access in the reverse direction.

    Create a public/private key on the other host; copy the public key to the desired host, and install in the authorized key file. You will then have both hosts with an authorised key file referring to the other host, and you will be able to sftp from either host without requiring a password.


  • 3.  Re: why sftp prompting password ?

    Posted Tue December 15, 2009 05:29 PM

    Originally posted by: chandru0078


    Hi Spook

    Thanks for the feedback.The exact problem is /etc/ssh_config configuration diffrent at node B and A. Node N configure to read authorized_keys2 instate authorized_keys and authorized_keys2 files not exist .

    Node B
    B:/ # grep -i Authorized /etc//sshd_config
    AuthorizedKeysFile .ssh/authorized_keys2
    Node A
    B:/ # grep -i Authorized /etc/sshd_config
    AuthorizedKeysFile .ssh/authorized_keys