Create SSH keys in the Azure portal - Azure Virtual Machines (2024)

  • Article

Applies to: ✔️ Linux VMs ✔️ Windows VMs ✔️ Flexible scale sets ✔️ Uniform scale sets

If you frequently use the portal to deploy Linux VMs, you can simplify using SSH keys by integrating them into Azure. There are several ways to create SSH keys for use with Azure.

  • You can create SSH keys when you first create a VM. Your keys aren't tied to a specific VM and you can use them in future applications.

  • You can create SSH keys in the Azure portal separate from a VM. You can use them with both new and old VMs.

  • You can create SSH keys externally and upload them for use in Azure.

You can reuse your stored keys in various of applications to fit your organization's needs.

For more detailed information about creating and using SSH keys with Linux VMs, see Use SSH keys to connect to Linux VMs.

Note

ED25519 SSH key support for Linux VMs is now in preview in all regions including sovereign clouds.

Generate new keys

  1. Open the Azure portal.

  2. At the top of the page, type SSH to search. Under Marketplace, select SSH keys.

  3. On the SSH Key page, select Create.

    Create SSH keys in the Azure portal - Azure Virtual Machines (1)

  4. In Resource group select Create new to create a new resource group to store your keys. Type a name for your resource group and select OK.

  5. In Region select a region to store your keys. You can use the keys in any region, this option is just the region where you store them.

  6. Type a name for your key in Key pair name.

  7. In SSH public key source, select Generate public key source.

  8. In SSH Key Type, select either RSA SSH Format or Ed25519 SSH Format [Preview]

  9. When you're done, select Review + create.

  10. After it passes validation, select Create.

  11. You'll get a pop-up window to, select Download private key and create resource that downloads the SSH key as a .pem file.

    Create SSH keys in the Azure portal - Azure Virtual Machines (2)

  12. Once you've downloaded the .pem file, you might want to move it somewhere on your computer where it's easy to point to from your SSH client.

Connect to the VM

On your local computer, open a PowerShell prompt and type:

ssh -i <path to the .pem file> username@<ipaddress of the VM>

For example, type: ssh -i /Downloads/mySSHKey.pem azureuser@123.45.67.890 and replace the example IP address at the end of the command with your VM's public IP address.

Upload an SSH key

You can also upload a public SSH key to store in Azure. For information about how to create an SSH key pair, see Use SSH keys to connect to Linux VMs.

  1. Open the Azure portal.

  2. At the top of the page, type SSH to search. Under *Marketplace, select SSH keys.

  3. On the SSH Key page, select Create.

    Create SSH keys in the Azure portal - Azure Virtual Machines (3)

  4. In Resource group select Create new to create a new resource group to store your keys. Type a name for your resource group and select OK.

  5. In Region select a region to store your keys. You can use the keys in any region, this option is just the region where they're stored.

  6. Type a name for your key in Key pair name.

  7. In SSH public key source, select Upload existing public key.

  8. Paste the full contents of the public key into Upload key and then select Review + create.

  9. After validation completes, select Create.

Once you upload the key, you can choose to use it when you create a VM.

List keys

Azure stores your SSH keys created in the portal as resources, so you can filter your resources view to see all of them.

  1. In the portal, select All resource.

  2. In the filters, select Type, unselect the Select all option to clear the list.

  3. Type SSH in the filter and select SSH key.

    Create SSH keys in the Azure portal - Azure Virtual Machines (4)

Get the public key

If you need your public key, you can easily copy it from the portal page for the key. Just list your keys (using the process in the last section) then select a key from the list. The page for your key opens and you can click the Copy to clipboard icon next to the key to copy it.

Next steps

To learn more about using SSH keys with Azure VMs, see Use SSH keys to connect to Linux VMs.

Create SSH keys in the Azure portal - Azure Virtual Machines (2024)
Top Articles
Ryan Scribner | Penguin Random House
Banking and Crypto
80 For Brady Showtimes Near Marcus Point Cinema
Soap2Day Autoplay
Aces Fmc Charting
Is Csl Plasma Open On 4Th Of July
Jesus Revolution Showtimes Near Chisholm Trail 8
True Statement About A Crown Dependency Crossword
Espn Expert Picks Week 2
Bros Movie Wiki
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
I Wanna Dance with Somebody : séances à Paris et en Île-de-France - L'Officiel des spectacles
Saberhealth Time Track
Viprow Golf
ARK: Survival Evolved Valguero Map Guide: Resource Locations, Bosses, & Dinos
Equibase | International Results
Carson Municipal Code
Delaware Skip The Games
Ahn Waterworks Urgent Care
Stoney's Pizza & Gaming Parlor Danville Menu
Kingdom Tattoo Ithaca Mi
How Taraswrld Leaks Exposed the Dark Side of TikTok Fame
Finding Safety Data Sheets
480-467-2273
Wat is een hickmann?
§ 855 BGB - Besitzdiener - Gesetze
Keyn Car Shows
Orange Park Dog Racing Results
Fedex Walgreens Pickup Times
Gwen Stacy Rule 4
Colorado Parks And Wildlife Reissue List
Keeper Of The Lost Cities Series - Shannon Messenger
Magicseaweed Capitola
That1Iggirl Mega
8 Ball Pool Unblocked Cool Math Games
The Banshees Of Inisherin Showtimes Near Reading Cinemas Town Square
Second Chance Apartments, 2nd Chance Apartments Locators for Bad Credit
Setx Sports
How Big Is 776 000 Acres On A Map
Strange World Showtimes Near Century Stadium 25 And Xd
Ups Authorized Shipping Provider Price Photos
Brown launches digital hub to expand community, career exploration for students, alumni
Paperlessemployee/Dollartree
Dragon Ball Super Card Game Announces Next Set: Realm Of The Gods
Myra's Floral Princeton Wv
Www Pig11 Net
Zadruga Elita 7 Live - Zadruga Elita 8 Uživo HD Emitirani Sat Putem Interneta
How to Get a Check Stub From Money Network
How to Find Mugshots: 11 Steps (with Pictures) - wikiHow
Fetllife Com
Latest Posts
Article information

Author: Trent Wehner

Last Updated:

Views: 5907

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Trent Wehner

Birthday: 1993-03-14

Address: 872 Kevin Squares, New Codyville, AK 01785-0416

Phone: +18698800304764

Job: Senior Farming Developer

Hobby: Paintball, Calligraphy, Hunting, Flying disc, Lapidary, Rafting, Inline skating

Introduction: My name is Trent Wehner, I am a talented, brainy, zealous, light, funny, gleaming, attractive person who loves writing and wants to share my knowledge and understanding with you.