<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf" -->

---
title: Recovering Access: A Guide for Lost EC2 Key Pair in Linux
description: This post provides 5 methods to regain access to an EC2 Linux instance if the key pair is lost. The methods include creating a new key pair, using Systems...
canonical: https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Recovering Access: A Guide for Lost EC2 Key Pair in Linux | daily.dev
og:description: This post provides 5 methods to regain access to an EC2 Linux instance if the key pair is lost. The methods include creating a new key pair, using Systems...
og:url: https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf
og:image: https://api.daily.dev/og/posts/9CvGQjlxf.png
og:image:alt: Recovering Access: A Guide for Lost EC2 Key Pair in Linux
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Recovering Access: A Guide for Lost EC2 Key Pair in Linux

**[AWS Community](https://daily.dev/sources/awscommunity)** · 5 min read · 3 upvotes · 0 comments

## Summary

This post provides 5 methods to regain access to an EC2 Linux instance if the key pair is lost. The methods include creating a new key pair, using Systems Manager, leveraging EC2 Instance Connect, utilizing the EC2 Serial Console, and swapping EBS volumes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://community.aws/content/2eqmuC2DlHdflQraFrvJxcI4es0>

---

Tags: [#linux](https://daily.dev/tags/linux), [#aws-ec2](https://daily.dev/tags/aws-ec2)

[View this post on daily.dev](https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Recovering Access: A Guide for Lost EC2 Key Pair in Linux","url":"https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf"},"datePublished":"2024-05-01T14:19:37.000Z","dateModified":"2024-05-09T09:28:47.883Z","description":"This post provides 5 methods to regain access to an EC2 Linux instance if the key pair is lost. The methods include creating a new key pair, using Systems...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/28dce1b21341c9963cc95b9c836fd481?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/28dce1b21341c9963cc95b9c836fd481?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"AWS Community","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"AWS Community","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/8d3ee64e7e4d4a65bb2135d02088600d","url":"https://daily.dev/sources/awscommunity"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/recovering-access-a-guide-for-lost-ec2-key-pair-in-linux-9cvgqjlxf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,aws-ec2","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"AWS Community","item":"https://daily.dev/sources/awscommunity"},{"@type":"ListItem","position":3,"name":"Recovering Access: A Guide for Lost EC2 Key Pair in Linux"}]}
```

