linux - unable to reach ssh remote host using ansible using aws key -


i trying ping server using ansible, getting error messages

[ec2-user@ip-172-30-0-64 kafka-scripts]$ ansible zook1 -m ping -vvv  using /home/ec2-user/kafka-scripts/ansible.cfg config file <172.30.0.113> establish ssh connection user: none <172.30.0.113> ssh: exec ssh -c -q -o controlmaster=auto -o controlpersist=60s -o 'identityfile="/home/ec2-user/kafka-scripts/keys/kafka_broker.pem"' -o kbdinteractiveauthentication=no -o preferredauthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o passwordauthentication=no -o connecttimeout=10 -o controlpath=/home/ec2-user/.ansible/cp/ansible-ssh-%h-%p-%r -tt 172.30.0.113 '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo $home/.ansible/tmp/ansible-tmp-1461268838.85-234429685988133 `" && echo "` echo $home/.ansible/tmp/ansible-tmp-1461268838.85-234429685988133 `" )'"'"'' zook1 | unreachable! => {      "changed": false,      "msg": "ssh encountered unknown error during connection. recommend re-run command using -vvvv, enable ssh debugging output diagnose issue",      "unreachable": true } 

with -vvvv

[ec2-user@ip-172-30-0-64 kafka-scripts]$ ansible zookservers -m ping -vvvv using /home/ec2-user/kafka-scripts/ansible.cfg config file loaded callback minimal of type stdout, v2.0 <172.30.0.113> establish ssh connection user: none <172.30.0.113> ssh: exec ssh -c -vvv -o controlmaster=auto -o controlpersist=60s -o 'identityfile="/home/ec2-user/kafka-scripts/keys/kafka_broker.pem"' -o kbdinteractiveauthentication=no -o preferredauthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o passwordauthentication=no -o connecttimeout=10 -o controlpath=/home/ec2-user/.ansible/cp/ansible-ssh-%h-%p-%r -tt 172.30.0.113 '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo $home/.ansible/tmp/ansible-tmp-1461270664.7-212192719472156 `" && echo "` echo $home/.ansible/tmp/ansible-tmp-1461270664.7-212192719472156 `" )'"'"''  zook1 | unreachable! => { "changed": false, "msg": "ssh encountered unknown error. output was:\nopenssh_6.6.1, openssl 1.0.1e-fips 11 feb 2013\r\ndebug1: reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: applying options *\r\ndebug1: auto-mux: trying existing master\r\ndebug1: control socket \"/home/ec2-user/.ansible/cp/ansible-ssh-172.30.0.113-22-ec2-user\" not exist\r\ndebug2: ssh_connect: needpriv 0\r\ndebug1: connecting 172.30.0.113 [172.30.0.113] port 22.\r\ndebug2: fd 3 setting o_nonblock\r\ndebug1: fd 3 clearing o_nonblock\r\ndebug1: connection established.\r\ndebug3: timeout: 10000 ms remain after connect\r\ndebug3: incorrect rsa1 identifier\r\ndebug3: not load \"/home/ec2-user/kafka-scripts/keys/kafka_broker.pem\" rsa1 public key\r\ndebug1: identity file /home/ec2-user/kafka-scripts/keys/kafka_broker.pem type -1\r\ndebug1: identity file /home/ec2-user/kafka-scripts/keys/kafka_broker.pem-cert type -1\r\ndebug1: enabling compatibility mode protocol 2.0\r\ndebug1: local version string ssh-2.0-openssh_6.6.1\r\ndebug1: remote protocol version 2.0, remote software version openssh_6.6.1\r\ndebug1: match: openssh_6.6.1 pat openssh_6.6.1* compat 0x04000000\r\ndebug2: fd 3 setting o_nonblock\r\ndebug3: load_hostkeys: loading entries host \"172.30.0.113\" file \"/home/ec2-user/.ssh/known_hosts\"\r\ndebug3: load_hostkeys: found key type ecdsa in file /home/ec2-user/.ssh/known_hosts:1\r\ndebug3: load_hostkeys: loaded 1 keys\r\ndebug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\r\ndebug1: ssh2_msg_kexinit sent\r\ndebug1: ssh2_msg_kexinit received\r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss\r\ndebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: zlib@openssh.com,zlib,none\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1\r\ndebug2: kex_parse_kexinit: ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se\r\ndebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96\r\ndebug2: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: none,zlib@openssh.com\r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: \r\ndebug2: kex_parse_kexinit: first_kex_follows 0 \r\ndebug2: kex_parse_kexinit: reserved 0 \r\ndebug2: mac_setup: setup hmac-md5-etm@openssh.com\r\ndebug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com\r\ndebug2: mac_setup: setup hmac-md5-etm@openssh.com\r\ndebug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com\r\ndebug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16\r\ndebug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16\r\ndebug1: sending ssh2_msg_kex_ecdh_init\r\ndebug1: expecting ssh2_msg_kex_ecdh_reply\r\ndebug1: server host key: ecdsa 55:88:b1:5a:cd:bb:87:ff:dd:54:b0:36:39:c7:e2:ea\r\ndebug3: load_hostkeys: loading entries host \"172.30.0.113\" file \"/home/ec2-user/.ssh/known_hosts\"\r\ndebug3: load_hostkeys: found key type ecdsa in file /home/ec2-user/.ssh/known_hosts:1\r\ndebug3: load_hostkeys: loaded 1 keys\r\ndebug1: host '172.30.0.113' known , matches ecdsa host key.\r\ndebug1: found key in /home/ec2-user/.ssh/known_hosts:1\r\ndebug1: ssh_ecdsa_verify: signature correct\r\ndebug2: kex_derive_keys\r\ndebug2: set_newkeys: mode 1\r\ndebug1: ssh2_msg_newkeys sent\r\ndebug1: expecting ssh2_msg_newkeys\r\ndebug2: set_newkeys: mode 0\r\ndebug1: ssh2_msg_newkeys received\r\ndebug1: ssh2_msg_service_request sent\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: ssh2_msg_service_accept received\r\ndebug2: key: /home/ec2-user/kafka-scripts/keys/kafka_broker.pem ((nil)), explicit\r\ndebug1: authentications can continue: publickey,gssapi-keyex,gssapi-with-mic\r\ndebug3: start over, passed different list publickey,gssapi-keyex,gssapi-with-mic\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup gssapi-with-mic\r\ndebug3: remaining preferred: gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled gssapi-with-mic\r\ndebug1: next authentication method: gssapi-with-mic\r\ndebug1: unspecified gss failure.  minor code may provide more information\nno kerberos credentials available\n\r\ndebug1: unspecified gss failure.  minor code may provide more information\nno kerberos credentials available\n\r\ndebug1: unspecified gss failure.  minor code may provide more information\n\n\r\ndebug1: unspecified gss failure.  minor code may provide more information\nno kerberos credentials available\n\r\ndebug2: did not send packet, disable method\r\ndebug3: authmethod_lookup gssapi-keyex\r\ndebug3: remaining preferred: hostbased,publickey\r\ndebug3: authmethod_is_enabled gssapi-keyex\r\ndebug1: next authentication method: gssapi-keyex\r\ndebug1: no valid key exchange context\r\ndebug2: did not send packet, disable method\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: next authentication method: publickey\r\ndebug1: trying private key: /home/ec2-user/kafka-scripts/keys/kafka_broker.pem\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@         warning: unprotected private key file!          @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\npermissions 0777 '/home/ec2-user/kafka-scripts/keys/kafka_broker.pem' open.\r\nit required private key files not accessible others.\r\nthis private key ignored.\r\nbad permissions: ignore key: /home/ec2-user/kafka-scripts/keys/kafka_broker.pem\r\ndebug2: did not send packet, disable method\r\ndebug1: no more authentication methods try.\r\npermission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "unreachable": true  } 

ssh debugging output:

ssh encountered unknown error. output was:\nopenssh_6.6.1, openssl 1.0.1e-fips 11 feb 2013 debug1: reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 56: applying options * debug1: auto-mux: trying existing master debug1: control socket "/home/ec2-user/.ansible/cp/ansible-ssh-172.30.0.113-22-ec2-user" not exist debug2: ssh_connect: needpriv 0 debug1: connecting 172.30.0.113 [172.30.0.113] port 22. debug2: fd 3 setting o_nonblock debug1: fd 3 clearing o_nonblock debug1: connection established. debug3: timeout: 10000 ms remain after connect debug3: incorrect rsa1 identifier debug3: not load "/home/ec2-user/kafka-scripts/keys/kafka_broker.pem" rsa1 public key debug1: identity file /home/ec2-user/kafka-scripts/keys/kafka_broker.pem type -1 debug1: identity file /home/ec2-user/kafka-scripts/keys/kafka_broker.pem-cert type -1 debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_6.6.1 debug1: remote protocol version 2.0, remote software version openssh_6.6.1 debug1: match: openssh_6.6.1 pat openssh_6.6.1* compat 0x04000000 debug2: fd 3 setting o_nonblock debug3: load_hostkeys: loading entries host "172.30.0.113" file "/home/ec2-user/.ssh/known_hosts" debug3: load_hostkeys: found key type ecdsa in file /home/ec2-user/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521 debug1: ssh2_msg_kexinit sent debug1: ssh2_msg_kexinit received debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-ed25519,ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit: first_kex_follows 0  debug2: kex_parse_kexinit: reserved 0  debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit:  debug2: kex_parse_kexinit: first_kex_follows 0  debug2: kex_parse_kexinit: reserved 0  debug2: mac_setup: setup hmac-md5-etm@openssh.com debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com debug2: mac_setup: setup hmac-md5-etm@openssh.com debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com zlib@openssh.com debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16 debug1: kex: curve25519-sha256@libssh.org need=16 dh_need=16 debug1: sending ssh2_msg_kex_ecdh_init debug1: expecting ssh2_msg_kex_ecdh_reply debug1: server host key: ecdsa 55:88:b1:5a:cd:bb:87:ff:dd:54:b0:36:39:c7:e2:ea debug3: load_hostkeys: loading entries host "172.30.0.113" file "/home/ec2-user/.ssh/known_hosts" debug3: load_hostkeys: found key type ecdsa in file /home/ec2-user/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug1: host '172.30.0.113' known , matches ecdsa host key. debug1: found key in /home/ec2-user/.ssh/known_hosts:1 debug1: ssh_ecdsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: ssh2_msg_newkeys sent debug1: expecting ssh2_msg_newkeys debug2: set_newkeys: mode 0 debug1: ssh2_msg_newkeys received debug1: ssh2_msg_service_request sent debug2: service_accept: ssh-userauth debug1: ssh2_msg_service_accept received debug2: key: /home/ec2-user/kafka-scripts/keys/kafka_broker.pem ((nil)), explicit debug1: authentications can continue: publickey,gssapi-keyex,gssapi-with-mic debug3: start over, passed different list publickey,gssapi-keyex,gssapi-with-mic debug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey debug3: authmethod_lookup gssapi-with-mic debug3: remaining preferred: gssapi-keyex,hostbased,publickey debug3: authmethod_is_enabled gssapi-with-mic debug1: next authentication method: gssapi-with-mic debug1: unspecified gss failure.  minor code may provide more information\nno kerberos credentials available\n debug1: unspecified gss failure.  minor code may provide more information\nno kerberos credentials available\n debug1: unspecified gss failure.  minor code may provide more information\n\n debug1: unspecified gss failure.  minor code may provide more information\nno kerberos credentials available\n debug2: did not send packet, disable method debug3: authmethod_lookup gssapi-keyex debug3: remaining preferred: hostbased,publickey debug3: authmethod_is_enabled gssapi-keyex debug1: next authentication method: gssapi-keyex debug1: no valid key exchange context debug2: did not send packet, disable method debug3: authmethod_lookup publickey debug3: remaining preferred: ,publickey debug3: authmethod_is_enabled publickey debug1: next authentication method: publickey debug1: trying private key: /home/ec2-user/kafka-scripts/keys/kafka_broker.pem @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @         warning: unprotected private key file!          @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ permissions 0777 '/home/ec2-user/kafka-scripts/keys/kafka_broker.pem' open. required private key files not accessible others. private key ignored. bad permissions: ignore key: /home/ec2-user/kafka-scripts/keys/kafka_broker.pem debug2: did not send packet, disable method debug1: no more authentication methods try. permission denied (publickey,gssapi-keyex,gssapi-with-mic). 

as written in error message, key file not protected should.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @         warning: unprotected private key file!          @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ permissions 0777 '/home/ec2-user/kafka-scripts/keys/kafka_broker.pem' open. required private key files not accessible others. 

running following command should fix problem, removing authorization others read key file.

chmod 600 /home/ec2-user/kafka-scripts/keys/kafka_broker.pem 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -