DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk10 min

Where Your SSH Key Is Stored and How to Find It on Your Computer

Your SSH key is usually in the hidden .ssh folder in your user home directory. This guide shows the exact macOS, Linux, and Windows paths, how to identify id_ed25519 and id_rsa files, and what to do when a custom path, agent, server configuration, or security token is involved.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Your SSH keys are normally in the hidden .ssh folder inside your user home directory. On macOS and Linux, start with ~/.ssh. On Windows 10 or 11 using OpenSSH, start with C:Users<username>.ssh, also written as %USERPROFILE%.ssh. A conventional key pair has a private file such as id_ed25519 or id_rsa, and a public copy with the same name plus .pub. Copy only the .pub file to GitHub, a server, or another service. The extensionless file is normally private and must be protected like a password.

Where SSH keys are usually stored

SSH authentication uses a mathematically linked pair. Your computer keeps the private key, which creates the authentication signature, while the remote service keeps the public key needed to verify that signature. The private key should remain under your control; it is not a file you upload to a server.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Operating system or setup First location to check Common filenames
macOS ~/.ssh (for example, /Users/alex/.ssh) id_ed25519, id_ed25519.pub, id_rsa, id_rsa.pub
Linux and other Unix-like systems ~/.ssh (for example, /home/alex/.ssh) id_ed25519, id_ed25519.pub, id_rsa, id_rsa.pub
Windows 10/11 OpenSSH C:Users<username>.ssh or %USERPROFILE%.ssh id_ed25519, id_ed25519.pub, id_rsa, id_rsa.pub

The tilde in ~/.ssh means your current user’s home directory, not the root of the disk. If several accounts use the same computer, each account has a different home directory and therefore a different SSH folder. A key created while signed in as one user will not automatically appear in another user’s .ssh directory.

How to tell the private key from the public key

The extensionless file is normally private

In a conventional pair, id_ed25519 is the private key and id_ed25519.pub is its public counterpart. The same rule applies to other base names, including id_rsa. Do not assume that a file is safe to share merely because it has no extension: treat every identity file without .pub as private until you have positively verified otherwise.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Microsoft’s OpenSSH guidance describes each private key as equivalent to a password. Never paste its contents into a chat, ticket, web form, terminal transcript, or source repository. Do not upload it to GitHub or copy it to a server when a service asks for your SSH key.

The .pub file is the shareable half

The public key is the file ending in .pub. It can be installed in a server account’s authorized-key list or added to a code-hosting account. The public file does not let somebody reconstruct the private key in practical use, which is why services ask you to paste the public text. Even so, keep track of which account and device each public key belongs to so that you can revoke obsolete access later.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the key on macOS or Linux

  1. Open Terminal from your applications menu.
  2. List the hidden SSH directory, including hidden files, with ls -la ~/.ssh.
  3. Look for matching names such as id_ed25519 and id_ed25519.pub, or id_rsa and id_rsa.pub. Other base names are possible if you chose a custom filename.
  4. If you need to discover every regular file directly inside that folder, run find ~/.ssh -maxdepth 1 -type f -print.
  5. To display a public key for copying, run cat ~/.ssh/id_ed25519.pub. Replace the filename with the one you actually found.

The output of a public-key command is normally one long line beginning with a key type such as ssh-ed25519 or ssh-rsa, followed by encoded data and often a comment. Copy that entire line. Do not substitute cat ~/.ssh/id_ed25519; that command prints the private key.

If the folder does not exist

An absent ~/.ssh directory usually means that this user has not generated a conventional local key pair, or that the key was saved elsewhere. It does not prove that you have no SSH access: an agent may hold a key, an application may use its own path, or a security token may contain a resident credential. Check the custom-path and agent sections below before generating another pair.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Find the key on Windows 10 or 11

  1. Open PowerShell under the Windows account that uses SSH.
  2. List the hidden directory with Get-ChildItem -Force $env:USERPROFILE.ssh.
  3. Look for pairs such as id_ed25519 with id_ed25519.pub, or id_rsa with id_rsa.pub. A different base name indicates a custom output path.
  4. To list only files, use Get-ChildItem -Force $env:USERPROFILE.ssh -File.
  5. For a graphical view, enter %USERPROFILE%.ssh in File Explorer’s address bar. If the folder is not visible, turn on View → Show → Hidden items (the exact wording can vary slightly by Windows build).

VS Code documentation uses C:Usersyour-user.sshid_ed25519.pub as a typical Windows public-key path. Replace your-user with the Windows profile name actually shown by $env:USERNAME or in the path displayed by File Explorer.

PowerShell versus Git tools

Windows can have more than one SSH installation. OpenSSH supplied with Windows, Git for Windows, an IDE, and a subsystem such as WSL can each read a different home directory or configuration. First determine which program is making the connection, then inspect the corresponding user profile. A key visible in WSL’s Linux home may not be in the native Windows profile, and a key in the Windows profile may not be automatically available inside WSL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the default filename is missing

A custom filename was selected

When ssh-keygen creates a key, it asks where to save it. Accepting the default produces a conventional name; entering another path produces a custom base name and a matching .pub file. Look at the command history, setup notes, or the application that created the key. Search only the locations you control rather than opening or copying private files indiscriminately.

SSH configuration points to another file

SSH can be told to use a non-default identity through an IdentityFile entry. On macOS or Linux, inspect ~/.ssh/config with grep -i identityfile ~/.ssh/config if that file exists. On Windows PowerShell, inspect the equivalent file with Select-String -Path $env:USERPROFILE.sshconfig -Pattern 'IdentityFile'. A host-specific block can select a different key than the global default, so read the surrounding host name as well as the path.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Configuration paths may be relative or use environment variables. Resolve them for the same account and program that makes the connection. A path that works in Terminal may fail in an IDE running under another account, and vice versa.

An SSH agent has the key

An agent keeps private-key operations available without requiring the application to open the key file for every connection. Run ssh-add -L to list public keys currently offered by the agent. This shows public keys only; it does not reveal private-key contents or necessarily tell you the original filename. If a key appears there while no familiar file is in .ssh, the private material may have been loaded from a custom path, another profile, or a hardware-backed provider.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which SSH key should you copy to GitHub or a server?

  1. Identify the key pair for the account and device you intend to authorize.
  2. Open only the public file, ending in .pub, with cat on macOS/Linux or a text editor on Windows.
  3. Copy the complete single line, including its key type and any trailing comment.
  4. Paste that line into the service’s SSH-key field or into the target account’s authorized-key file.
  5. Keep the matching private file on your computer and protect it with its passphrase and file permissions.

If you have several public keys, compare their comments, creation notes, or the host-specific IdentityFile entries that select them. Adding every key “just in case” expands access unnecessarily and makes later revocation harder.

Test a particular identity without changing your configuration

To test a known private-key path for one connection, use ssh -i /path/to/private_key user@host on macOS or Linux. In PowerShell, provide the Windows path after -i, for example ssh -i C:Usersalex.sshwork_key user@host. This command selects that identity for the test rather than changing your SSH configuration permanently.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Use the private filename in the -i argument, not the .pub filename. If the key has a passphrase, SSH will request it. A successful login confirms that the selected private key can authenticate with a corresponding public key already authorized on the server; it does not mean that every host or application will choose the same identity automatically.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Where the other half is stored on a server

Unix-like servers

A Unix-like server commonly keeps authorized public keys in the target account’s ~/.ssh/authorized_keys. That file contains public-key lines accepted for that account. The client’s private key remains on the client computer; copying it into authorized_keys defeats the security model.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows OpenSSH servers

For Microsoft’s Windows OpenSSH administrator setup, authorized keys are stored in C:ProgramDatasshadministrators_authorized_keys. The exact location depends on the account and server configuration, so do not assume that this administrator file applies to every Windows user.

Do not confuse user keys with host keys

Host keys identify the server to clients; they are not your personal login keys. Microsoft documents Windows service host keys under C:ProgramDatassh for the sshd service. A warning about a changed host key concerns server identity and known-host records, not the location of your client private key.

When the credential is on a hardware token

Not every SSH credential is an ordinary disk file. OpenSSH supports FIDO/U2F resident keys held on an attached security token. In that arrangement, the private operation can remain on the token, so searching ~/.ssh may find no usable private-key file.

OpenSSH’s ssh-keygen -K option downloads resident keys into public/private key files when the token and its configuration permit that operation. Treat any downloaded private file as sensitive immediately. If you cannot export the credential, connect the token and use the SSH client or agent that supports it instead of trying to invent a missing disk path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

File storage and hardware-token storage compared

Consideration Ordinary key file Resident hardware token
Recoverability Can be backed up if the private file and passphrase are preserved. May be recoverable only through the token’s supported resident-key procedure; loss of the token can remove access unless another credential exists.
Exposure if the disk is copied A copied private file can be attacked, especially if its passphrase is weak or absent. The private operation stays on the token, reducing exposure from a copied computer disk.
Passphrase and agent convenience Can be unlocked by an SSH agent and reused during a session. Usually requires the token to be present and may require user interaction or a token PIN.
Portability Can be moved to another compatible computer only through a deliberate, secure backup. Works on systems supporting the token and FIDO-enabled SSH, but requires the physical device and compatible software.
Export back to a file The private key is already a file. Export may be unavailable; ssh-keygen -K applies to supported resident keys.

Protect, back up, and retire your keys safely

  • Use a strong passphrase when creating or importing a file-based private key.
  • Restrict access to the private file and the .ssh directory so other local users cannot read them.
  • Back up an important private key only through an encrypted method you can recover, and record which services use its public counterpart.
  • Never place a private key in a public repository, cloud document, issue, chat, or support ticket.
  • If you think a private key was exposed, remove its public counterpart from every server or service that trusts it and create a replacement pair.
  • Do not delete the only working key until a replacement has been tested from a separate session.

A passphrase protects a stolen file but does not make intentional sharing safe. Anyone who obtains both an unrevoked public-key authorization and the usable private key may be able to authenticate as you, subject to the server’s account and policy controls.

Common reasons people think an SSH key is missing

They searched for “SSH key” instead of the hidden folder

Operating systems often hide directories beginning with a dot. Use ls -la, PowerShell’s -Force, or File Explorer’s hidden-item setting rather than relying on a normal folder view.

They opened the wrong user profile

Check the account that generated or uses the key. Administrator, standard-user, corporate, WSL, and remote-session profiles can have different home directories.

They copied the public key and expected the private file to be on the server

Only the public half belongs on the server or service. The private half should stay with the client, so its absence from the remote machine is expected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

They have an agent or token instead of a conventional file

Use ssh-add -L to see agent-offered public keys, inspect IdentityFile settings, and consider whether a FIDO/U2F token holds a resident credential.

A quick decision path

  1. Check the hidden .ssh directory in the correct user home folder.
  2. Match each extensionless identity file with its .pub file.
  3. If no default pair exists, inspect SSH configuration and the command or application that created the key.
  4. Check ssh-add -L for keys currently loaded into an agent.
  5. Ask whether the credential is resident on a security token and whether ssh-keygen -K is supported.
  6. When authorizing access, copy only the public line and test the intended private identity with ssh -i.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.