- Newest
- Most votes
- Most comments
The problem was not caused by time drift.
Problem was related to SSH keys. I did not realize that I need to use cert key also. So, thank you for that URL to SSH docs, based on this I was able to solve problem.
To anyone who have problem with temporary key from API ( https://docs.aws.amazon.com/cli/latest/reference/lightsail/get-instance-access-details.html )
- Save certKey in temp_id_rsa.pub
- Save privateKey in temp_id_rsa
- Connect to instance with SSH: ssh ubuntu@XXX.XXX.XXX.XXX -i temp_id_rsa
There's a popular root cause for this: perhaps your instance system clock drifted too much.
SSH user certificates are time sensitive, in Lightsail they last few minutes only. If the clock on instance is wrong, they will never be usable.
Does Lightsail browser-based SSH work for you, @mariuszm?
To check, replace placeholders with the values that apply for you and visit the resulting URL:
https://lightsail.aws.amazon.com/ls/remote/YOUR_REGION/instances/YOUR_INSTANCE_NAME/terminal?protocol=ssh
See also:
- Learn more about SSH user certificates: http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/ssh/PROTOCOL.certkeys?content-type=text/plain
Relevant content
- asked 4 months ago
- asked 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
@mariuszm I am still not able to connect. Getting 'Load key "temp_id_rsa": invalid format'.