Hi all.
I have looked for some answers on this subject, but it seems that I am missing something... NO, it's not brains...
I have implemented SSH on 5 servers running AIX 5.2 and sftp is also working with password authentication. I need to setup public key use, as our ftp's are run in batches.
I have created public and private keys with ssh-keygen -t rsa, I have copied the contents of the id_rsa.pub file to the authorized_keys file in /home/root/.ssh/ on the secondary server (perm set to 644 ).
I have compared these 2 files and they look exactly the same.
If I do sftp 'hostname', it returns:
Connecting to 'hostname'...
Connection closed by XX.XXX.X.XX
Connection closed
And that is all.
-v gives me the following:
home/root/.ssh # sftp -v 'hostname'
Connecting to 'hostname'...
OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.6l 04 Nov 2003
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to 'hostname' [XX.XXX.X.XX] port 22.
debug1: Connection established.
debug1: identity file /home/root/.ssh/id_rsa type 1
debug1: identity file /home/root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.8p1
debug1: match: OpenSSH_3.8p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8p1
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 'hostname' is known and matches the RSA host key.
debug1: Found key in /home/root/.ssh/known_hosts:2
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: /home/root/.ssh/id_rsa
Connection closed by XX.XXX.X.XX
Connection closed
Hoping for some expert help.
Thanks
Justus
I have looked for some answers on this subject, but it seems that I am missing something... NO, it's not brains...
I have implemented SSH on 5 servers running AIX 5.2 and sftp is also working with password authentication. I need to setup public key use, as our ftp's are run in batches.
I have created public and private keys with ssh-keygen -t rsa, I have copied the contents of the id_rsa.pub file to the authorized_keys file in /home/root/.ssh/ on the secondary server (perm set to 644 ).
I have compared these 2 files and they look exactly the same.
If I do sftp 'hostname', it returns:
Connecting to 'hostname'...
Connection closed by XX.XXX.X.XX
Connection closed
And that is all.
-v gives me the following:
home/root/.ssh # sftp -v 'hostname'
Connecting to 'hostname'...
OpenSSH_3.8p1, SSH protocols 1.5/2.0, OpenSSL 0.9.6l 04 Nov 2003
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to 'hostname' [XX.XXX.X.XX] port 22.
debug1: Connection established.
debug1: identity file /home/root/.ssh/id_rsa type 1
debug1: identity file /home/root/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.8p1
debug1: match: OpenSSH_3.8p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8p1
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 'hostname' is known and matches the RSA host key.
debug1: Found key in /home/root/.ssh/known_hosts:2
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: /home/root/.ssh/id_rsa
Connection closed by XX.XXX.X.XX
Connection closed
Hoping for some expert help.
Thanks
Justus