How long does the one-time use SSH public key expire?
I'm interested in the recent feature https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html .
The doc says there is a one-time use SSH public key that only remains 60 seconds.
But I tried it by self, looks like the one-time SSH public key always is valid after pushing it via cli. I can still use the corresponding private key to login the instance after pushing public key more than 10 minutes.
Is it expected behavior? How should I understand the one-time use SSH public key mentioned in doc?
I turned it out. EC2 instance connect works as expected to create one-time SSH public key for 60 times.
The behavior I observed caused by ssh-agent cached another key of ec2 instance.
Ed25519 SSH public key supportasked 3 months ago
Unable to access SSH for EC-2asked 11 days ago
Configure public key authentication for new user, when password authentication is disabledasked 3 months ago
AWS Lightsail CentOS 8 instance - how to find default password for ssh?Accepted Answerasked a month ago
Are ed25519 ssh keys supported in AWS Transfer Family?asked 6 months ago
ssh key-pair anomaly on copying AMIasked 4 months ago
AWS Transfer Family - SSH Key Pairasked 6 months ago
How long does the one-time use SSH public key expire?Accepted Answerasked 3 years ago
How can I receive the header and footer in getting the public key from KMS?asked 8 months ago
SSH key managment for multiple accountsAccepted Answerasked 12 days ago