Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

How to Find and Check SSH Keys on Your VPS or VDS

Find the right SSH key information safely: display a public key, derive its matching public key, check a fingerprint, or inspect a server account’s authorized_keys file.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To view the public key saved on your computer, run cat ~/.ssh/id_ed25519.pub and substitute the path to your actual .pub file. A public key is safe to share when you intend to authorize access; a private key is not. If by “SSH key content” you mean the keys accepted by a server account, check that account’s ~/.ssh/authorized_keys instead.

First, identify which SSH key information you need

SSH key files can refer to different things. Your client identity is normally a public/private key pair: the public key can be installed on a server, while the private key proves your identity and must remain confidential. A fingerprint is a short identifier for a key, not the full key text. The server account’s authorized_keys file lists public keys that may log in to that account; it does not contain their matching private keys.

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.

Also distinguish the machine and user. If you generated the key on your laptop and use it to connect to a VPS or VDS, inspect the laptop’s SSH directory. Logging into the server does not reveal the private key stored on your laptop. The relevant ~/.ssh path belongs to the user whose identity or server account you are checking.

Find the public key on the computer that holds your identity

  1. Open a shell as the local user whose SSH identity you want to inspect. The tilde in ~/.ssh refers to that user’s home directory.

    #1 Best Overall
    Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
    • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
    • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
    • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
    • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
    • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
  2. List the SSH directory, including hidden entries:

    ls -la ~/.ssh

    OpenSSH identity names often include id_ed25519 or id_rsa; the corresponding public key commonly has the same name with .pub appended. A key may instead use a custom filename or location.

  3. Print the public key by using its actual public-key path. For example:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    cat ~/.ssh/id_ed25519.pub

    The output is usually a single line suitable for copying into an account’s authorized keys when you intend to grant that key access. OpenSSH says public-key contents do not need to be kept secret (OpenSSH ssh(1) manual).

    Rank #2
    Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
    • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
    • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
    • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
    • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
    • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Generate the public-key text if the .pub file is missing

If you have the matching private key but not its public-key file, derive the public key without displaying the private key itself:

ssh-keygen -y -f ~/.ssh/id_ed25519

Replace the example path with the actual private-key path. OpenSSH’s ssh-keygen -y option reads a private OpenSSH-format key and writes its public key to standard output. If the key is encrypted, you may be prompted for its passphrase (OpenSSH ssh-keygen(1) manual).

Show a fingerprint instead of the full public key

When you only need to identify or compare a key, print its fingerprint:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts
ssh-keygen -l -f ~/.ssh/id_ed25519.pub

Use the relevant public-key file path. The -l option displays a fingerprint; it does not print the full public-key line. This is often the better choice when you need to verify which key is in use without sharing key text.

Inspect public keys accepted by a VPS or VDS account

After connecting to the server, inspect the home directory of the account whose login access you are checking:

cat ~/.ssh/authorized_keys

This file normally contains public-key entries authorized for that account. OpenSSH documents ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2 as default locations when the server’s AuthorizedKeysFile setting has not been changed. An administrator can configure a different path, so the file shown here may not be the one sshd actually uses (OpenSSH sshd(8) manual).

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

Reading the server’s authorized-key list is not a way to recover a client’s private key. The server holds public keys accepted for login; keep the corresponding private identity file on the machine where it was created or is securely managed.

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

Protect private-key files and troubleshoot common problems

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.