Comment 10 for bug 1904741

Balint Reczey (rbalint) wrote :

Verified on Xenial with 1.1.12+dfsg1-0ubuntu3~16.04.1:

ubuntu@ip-172-31-43-13:~$ dpkg -l ec2-instance-connect | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================-=============================-============-=============================================================
ii ec2-instance-connect 1.1.12+dfsg1-0ubuntu3~16.04.1 all Configures ssh daemon to accept EC2 Instance Connect ssh keys
ubuntu@ip-172-31-43-13:~$ bash -x /usr/share/ec2-instance-connect/eic_curl_authorized_keys ubuntu
+ set -e
+ umask 077
+ IMDS=http://169.254.169.254/latest/meta-data
...
++ /usr/bin/curl -s -f -m 1 -H 'X-aws-ec2-metadata-token: XXX==' http://169.254.169.254/latest/meta-data/services/domain/
+ domain=amazonaws.com
+ domain_exit=0
+ '[' 0 -ne 0 ']'
+ is_domain_valid=1
+ for valid_domain in amazonaws.com amazonaws.com.cn c2s.ic.gov sc2s.sgov.gov
+ '[' amazonaws.com = amazonaws.com ']'
+ is_domain_valid=0
+ break
+ '[' 0 -eq 1 ']'
...