unable to log into ec2 instance after creation
Created by: junkb
hi-
i've created a couple of different ec2 instances from the following amis:
- alpine-ami-edge-x86_64-20200403021415 [ami-034b4fb0ea71693e3]
- alpine-ami-3.11.5-x86_64-r0 [ami-02fa6ea44ed68cbd1]
the creation of the ec2 instance appears to go well, but i'm unable to ssh:
ssh -vi ~/.ssh/keys/aws-ec2_default-id_rsa alpine@xx.xx.xx.xx OpenSSH_8.1p1, LibreSSL 2.7.3 debug1: Reading configuration data /Users/localadmin/.ssh/config debug1: /Users/localadmin/.ssh/config line 226: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 47: Applying options for * debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 22. debug1: Connection established. debug1: identity file /Users/localadmin/.ssh/keys/aws-ec2_default-id_rsa type 0 debug1: identity file /Users/localadmin/.ssh/keys/aws-ec2_default-id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2 debug1: match: OpenSSH_8.2 pat OpenSSH* compat 0x04000000 debug1: Authenticating to xx.xx.xx.xx:22 as 'alpine' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ssh-ed25519 SHA256:FdZdi0GCPUcFG6beSQeWtoxXt2cflQRKjizOWp4ZkQs debug1: Host 'xx.xx.xx.xx' is known and matches the ED25519 host key. debug1: Found key in /Users/localadmin/.ssh/known_hosts:530 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: Will attempt key: RSA SHA256:nVH/fq39jd8EtRgsHapJSkmfHYBt9kF1Ld6b3+9k9bI agent debug1: Will attempt key: /Users/localadmin/.ssh/keys/aws-ec2_default-id_rsa RSA SHA256:WQWW4Tg8klA49FkqeijWamj3ZzsxBhyarTWLnp+0Wkc explicit debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Offering public key: RSA SHA256:nVH/fq39jd8EtRgsHapJSkmfHYBt9kF1Ld6b3+9k9bI agent debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Offering public key: /Users/localadmin/.ssh/keys/aws-ec2_default-id_rsa RSA SHA256:WQWW4Tg8klA49FkqeijWamj3ZzsxBhyarTWLnp+0Wkc explicit debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: keyboard-interactive debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: password alpine@xx.xx.xx.xx's password:
it appears to be attempting to use the key, but the remote side is not accepting it.
connecting to ec2 instances created from other amis [for example amazone linux] seem to work as expected.
how can i troubleshoot what i'm doing wrong?
thanks