0

I have learning ansible on aws cloud where I've launched aws ec2 instance while connecting via ssh with pem key it ask for password but I was able to connect the aws ec2 instance with pemkey.

 ssh -i "Ansible_Learn_ubuntunode1.pem" ubuntu@ec2-xx-xx-xxx-xxx.us-east-2.compute.amazonaws.com   -v
OpenSSH_7.6p1 Ubuntu-4ubuntu0.2, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to ec2-xx-xx-xxx-xxx.us-east-2.compute.amazonaws.com [13.58.119.243] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file Ansible_Learn_ubuntunode1.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file Ansible_Learn_ubuntunode1.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu2.7
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu2.7 pat OpenSSH* compat 0x04000000
debug1: Authenticating to ec2-xx-xx-xxx-xxx.us-east-2.compute.amazonaws.com:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:VDmYb/NFommn3Tb4vvRMJKEw/jOjkPphWvh9/NPJHaE
debug1: Host 'ec2-xx-xx-xxx-xxx.us-east-2.compute.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /home/nataraj/.ssh/known_hosts:256
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:Vt8zNpUdWR3DU8oNNkpLq9kaJemsk9UyJmOZSav8zlI nataraj@krushna
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: Ansible_Learn_ubuntunode1.pem
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
ubuntu@ec2-xx-xx-xxx-xxx.us-east-2.compute.amazonaws.com's password:

I have able to find some related scenarios

https://superuser.com/questions/1270144/ssh-how-stop-permission-denied-publickey

Later I have also tried form AWS troubleshoot page

enter link description here Error: User key not recognized by server

In the above link its suggested me that Java was not enable in my web browser and but In the same browser (firefox) I was able to run other ec2 instance in the same web browser (firefox) without nay issue

I have installed java as per the below instructionenter link description here

still i was unable to connected my ec2 instance can any one explain me what is actual problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.