Using EICE based on vpc: {'OwnerId': 'XXXXXXXXXXXX', 'InstanceConnectEndpointId': 'eice-01234567890', 'InstanceConnectEndpointArn': 'arn:aws:ec2:eu-central-1:XXXXXXXXXXXX:instance-connect-endpoint/eice-01234567890', 'State': 'create-complete', 'StateMessage': '', 'DnsName': 'eice-01234567890.123456.ec2-instance-connect-endpoint.eu-central-1.amazonaws.com', 'NetworkInterfaceIds': ['eni-01234567890'], 'VpcId': 'vpc-01234567890', 'AvailabilityZone': 'eu-central-1a', 'CreatedAt': '2024-11-23T12:06:37+00:00', 'SubnetId': 'subnet-01234567890', 'PreserveClientIp': False, 'SecurityGroupIds': ['sg-01234567890'], 'Tags': [{'Key': 'aws:cloudformation:stack-name', 'Value': 'XXXXXXXXXX'}, {'Key': 'aws:cloudformation:logical-id', 'Value': 'EC2InstanceConnectEndpoint'}, {'Key': 'aws:cloudformation:stack-id', 'Value': 'arn:aws:cloudformation:eu-central-1:XXXXXXXXXXXX:stack/XXXXXXXXXXXXXXX/123456-123456-123456'}, {'Key': 'Name', 'Value': '[XXXXXXXXXXXXXXX]'}]} Generate new ssh key and upload Generate Ed25519 Key Upload public ssh key to instance Event choose-service-name: calling handler Loading JSON file: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\data\ec2-instance-connect\2018-04-02\endpoint-rule-set-1.json Event creating-client-class.ec2-instance-connect: calling handler Looking for endpoint for ec2-instance-connect via: environment_service Looking for endpoint for ec2-instance-connect via: environment_global Looking for endpoint for ec2-instance-connect via: config_service Looking for endpoint for ec2-instance-connect via: config_global No configured endpoint found. Creating a regex based endpoint for ec2-instance-connect, eu-central-1 Setting ec2-instance-connect timeout as (60, 60) Upload ssh key to instance Event provide-client-params.ec2-instance-connect.SendSSHPublicKey: calling handler Event before-parameter-build.ec2-instance-connect.SendSSHPublicKey: calling handler Calling endpoint provider with parameters: {'Region': 'eu-central-1', 'UseDualStack': False, 'UseFIPS': False} Endpoint provider result: https://ec2-instance-connect.eu-central-1.amazonaws.com Event before-call.ec2-instance-connect.SendSSHPublicKey: calling handler Making request for OperationModel(name=SendSSHPublicKey) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'X-Amz-Target': 'AWSEC2InstanceConnectService.SendSSHPublicKey', 'Content-Type': 'application/x-amz-json-1.1', 'User-Agent': 'aws-cli/2.17.51 md/awscrt#0.21.2 ua/2.0 os/windows#10 md/arch#amd64 lang/python#3.11.9 md/pyimpl#CPython cfg/retry-mode#standard md/installer#exe md/prompt#off md/command#ec2-instance-connect.ssh'}, 'body': b'{"InstanceId": "i-01234567890", "InstanceOSUser": "XXXXX", "SSHPublicKey": "ssh-ed25519 AAAAAA"}', 'url': 'https://ec2-instance-connect.eu-central-1.amazonaws.com/', 'context': {'client_region': 'eu-central-1', 'client_config': , 'has_streaming_input': False, 'auth_type': None}} Event request-created.ec2-instance-connect.SendSSHPublicKey: calling handler > Event choose-signer.ec2-instance-connect.SendSSHPublicKey: calling handler Calculating signature using v4 auth. CanonicalRequest: POST / content-type:application/x-amz-json-1.1 host:ec2-instance-connect.eu-central-1.amazonaws.com x-amz-date:20241205T170000Z x-amz-target:AWSEC2InstanceConnectService.SendSSHPublicKey content-type;host;x-amz-date;x-amz-target XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX StringToSign: AWS4-HMAC-SHA256 20241205T170000Z 20241205/eu-central-1/ec2-instance-connect/aws4_request XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Signature: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Sending http request: Certificate path: C:\Program Files\Amazon\AWSCLIV2\awscli\botocore\cacert.pem Starting new HTTPS connection (1): ec2-instance-connect.eu-central-1.amazonaws.com:443 https://ec2-instance-connect.eu-central-1.amazonaws.com:443 "POST / HTTP/1.1" 200 67 Response headers: {'x-amzn-RequestId': 'XXXXXXXXXXXXXXXXXXXXX', 'Content-Type': 'application/x-amz-json-1.1', 'Content-Length': '67', 'Date': 'Thu, 05 Dec 2024 17:00:00 GMT'} Response body: b'{"RequestId":"XXXXXXXXXXXXXXXXXXXXX","Success":true}' Event needs-retry.ec2-instance-connect.SendSSHPublicKey: calling handler > Not retrying request. Event after-call.ec2-instance-connect.SendSSHPublicKey: calling handler > Generated temporary key file: C:\Users\XXXXX\AppData\Local\Temp\tmpglu9ksh8\private-key Using aws: aws Using ssh: C:\Windows\System32\OpenSSH\ssh.EXE Invoking SSH command: ['C:\\Windows\\System32\\OpenSSH\\ssh.EXE', '-o', 'ServerAliveInterval=5', '-p', '22', '-i', 'C:\\Users\\XXXXX\\AppData\\Local\\Temp\\tmpglu9ksh8\\private-key', '-v', '-o', 'ProxyCommand=aws ec2-instance-connect open-tunnel --instance-id i-01234567890 --private-ip-address xxx.yyy.www.zzz --remote-port 22 --instance-connect-endpoint-id eice-01234567890 --instance-connect-endpoint-dns-name eice-01234567890.1f2484f8.ec2-instance-connect-endpoint.eu-central-1.amazonaws.com', 'XXXXX@xxx.yyy.www.zzz'] OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2 debug1: Executing proxy command: exec aws ec2-instance-connect open-tunnel --instance-id i-01234567890 --private-ip-address xxx.yyy.www.zzz --remote-port 22 --instance-connect-endpoint-id eice-01234567890 --instance-connect-endpoint-dns-name eice-01234567890.12345.ec2-instance-connect-endpoint.eu-central-1.amazonaws.com debug1: identity file C:\\Users\\XXXXX\\AppData\\Local\\Temp\\tmpglu9ksh8\\private-key type 3 debug1: identity file C:\\Users\\XXXXX\\AppData\\Local\\Temp\\tmpglu9ksh8\\private-key-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_9.5 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.7 debug1: compat_banner: match: OpenSSH_8.7 pat OpenSSH* compat 0x1234567890 debug1: Authenticating to xxx.yyy.www.zzz:22 as 'XXXXX' debug1: load_hostkeys: fopen C:\\Users\\XXXXX/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory 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: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:PwB2JxCCndR8e44SJWSjEc3XKFH2Y29N6PRK8CCvdUQ debug1: load_hostkeys: fopen C:\\Users\\XXXXX/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory debug1: Host 'xxx.yyy.www.zzz' is known and matches the ED25519 host key. debug1: Found key in C:\\Users\\XXXXX/.ssh/known_hosts:74 debug1: ssh_packet_send2_wrapped: resetting send seqnr 3 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: ssh_packet_read_poll2: resetting read seqnr 3 debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: get_agent_identities: agent returned 1 keys debug1: Will attempt key: GitHub key - XXXXX.YYYYY@ZZZZZ.com RSA SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX agent debug1: Will attempt key: C:\\Users\\XXXXX\\AppData\\Local\\Temp\\tmpglu9ksh8\\private-key ED25519 SHA256:F5u04U4rrpHppWVQstutcsyozWx+eMJKPTuKkaIVNdE explicit debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs= debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Next authentication method: publickey debug1: Offering public key: GitHub key - XXXXX.YYYYY@ZZZZZ.com RSA SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX agent debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Offering public key: C:\\Users\\XXXXX\\AppData\\Local\\Temp\\tmpglu9ksh8\\private-key ED25519 SHA256:F5u04U4rrpHppWVQstutcsyozWx+eMJKPTuKkaIVNdE explicit debug1: Server accepts key: C:\\Users\\XXXXX\\AppData\\Local\\Temp\\tmpglu9ksh8\\private-key ED25519 SHA256:F5u04U4rrpHppWVQstutcsyozWx+eMJKPTuKkaIVNdE explicit Authenticated to xxx.yyy.www.zzz (via proxy) using "publickey". debug1: channel 0: new session [client-session] (inactive timeout: 0) debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug1: pledge: filesystem debug1: ENABLE_VIRTUAL_TERMINAL_INPUT is supported. Reading the VTSequence from console debug1: ENABLE_VIRTUAL_TERMINAL_PROCESSING is supported. Console supports the ansi parsing debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0 debug1: client_input_hostkeys: searching C:\\Users\\XXXXX/.ssh/known_hosts for xxx.yyy.www.zzz / (none) debug1: client_input_hostkeys: searching C:\\Users\\XXXXX/.ssh/known_hosts2 for xxx.yyy.www.zzz / (none) debug1: client_input_hostkeys: hostkeys file C:\\Users\\XXXXX/.ssh/known_hosts2 does not exist debug1: client_input_hostkeys: no new or deprecated keys from server debug1: Remote: /opt/aws/bin/eic_run_authorized_keys %u %f:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug1: Remote: /opt/aws/bin/eic_run_authorized_keys %u %f:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding debug1: pledge: fork , #_ ~\_ ####_ Amazon Linux 2023 ~~ \_#####\ ~~ \###| ~~ \#/ ___ https://aws.amazon.com/linux/amazon-linux-2023 ~~ V~' '-> ~~~ / ~~._. _/ _/ _/ _/m/'