Skip to main contentSkip to navigation
[email protected]
Client AreaSupport
Hosting Mammoth
HostingMammothYour Data, Our Responsibility
Home
Solutions
Hosting Services
Store
Pricing
About
Blog
API
Contact

Stay Ahead of the Curve

Get the latest insights on cybersecurity, AI innovations, and enterprise data solutions delivered to your inbox.

Hosting Mammoth
HostingMammothEnterprise Solutions

Enterprise-grade data solutions. Hosting, recovery, cybersecurity, and AI-powered services for businesses worldwide.

[email protected]
Sun - Fri, 9:00am - 5:00pm

Services

  • Cloud Hosting
  • Data Recovery
  • Cybersecurity
  • Legal Support
  • MSP Services
  • Web Development
  • AI Services
  • Free Server Migration

Hosting

  • VPS Hosting (NVMe SSD)
  • VDS Hosting (NVMe)
  • Storage VPS (High SSD)
  • GPU Servers
  • Managed Services
  • Cloud Firewall
  • Load Balancer
  • One-Click Apps
  • n8n Hosting
  • Object Storage
  • FAQ

Company

  • Store
  • Pricing
  • About Us
  • Locations
  • Blog
  • Testimonials
  • Contact
  • Affiliate Program
  • White-Label
  • Terms of Service
  • Privacy Policy
  • Browser Cookies
  • SLA

Support

  • Client Area
  • Submit Ticket
  • Knowledge Base
  • Server Status
  • API Documentation

© 2026 Hosting Mammoth. All rights reserved.

Knowledge Base
Getting StartedAccount ManagementVPS HostingGPU ServersStorage VPSCloud FirewallLoad BalancerServer ManagementBilling & PaymentsSupport & TicketsAffiliate ProgramReseller ProgramMarketplace & Appsn8n HostingManaged ServicesServer MigrationAPI & DevelopersSecurityTroubleshootingGlossaryInstall Guides
  1. Home
  2. /
  3. Support
  4. /
  5. Server Management
  6. /
  7. Manage Ssh Keys
GUIDEServer Management

Managing SSH Keys

5 min read

SSH keys provide a secure, convenient alternative to password-based authentication when connecting to your server. Instead of entering a password each time you log in, SSH keys use a pair of cryptographic keys — one private (kept on your local machine) and one public (stored on the server) — to verify your identity automatically.

This guide covers how to generate SSH keys, add them to your Data Mammoth account and servers, and manage them effectively.

Why Use SSH Keys?

SSH key authentication offers several advantages over password-based login:

  • Stronger security — SSH keys are virtually impossible to brute-force, unlike passwords.
  • Convenience — No need to type a password for every connection.
  • Automation friendly — Scripts, CI/CD pipelines, and tools can connect without interactive password prompts.
  • Auditability — Different keys can be used for different team members, making it easy to track access.
For additional security best practices around SSH keys, see SSH Key Best Practices.

Generating an SSH Key Pair

On macOS and Linux

Open your terminal and run:

bash
ssh-keygen -t ed25519 -C "[email protected]"

When prompted:

  • File location — Press Enter to accept the default (~/.ssh/id_ed25519) or specify a custom path.
  • Passphrase — Enter a strong passphrase to protect your private key (recommended), or press Enter to skip.
  • This creates two files:

    • ~/.ssh/id_ed25519 — Your private key. Never share this.
    • ~/.ssh/id_ed25519.pub — Your public key. This is what you add to servers.

    On Windows

    If you use Windows 10/11 with OpenSSH installed, open PowerShell and run the same command:

    powershell
    ssh-keygen -t ed25519 -C "[email protected]"

    If you prefer a graphical tool, PuTTYgen can generate SSH keys in PuTTY's format, which can then be converted to OpenSSH format.

    Key Type Recommendations

    Key TypeRecommendation
    ed25519Recommended. Modern, fast, and secure.
    RSA (4096-bit)Good alternative if ed25519 is not supported. Use ssh-keygen -t rsa -b 4096.
    RSA (2048-bit)Minimum acceptable. Consider upgrading to 4096-bit or ed25519.
    DSADeprecated. Do not use.
    ECDSAAcceptable but ed25519 is generally preferred.

    Adding SSH Keys to Your Data Mammoth Account

    You can store SSH keys in your Data Mammoth account so they are automatically available when provisioning new servers.

  • Log in to your Data Mammoth dashboard.
  • Navigate to Account Settings or SSH Keys from the top-right menu.
  • Click Add SSH Key.
  • Enter a label (e.g., "Work Laptop" or "CI/CD Pipeline").
  • Paste your public key content. To copy it:
  • bash
    cat ~/.ssh/id_ed25519.pub

  • Click Save.
  • When you order a new server, you can select which SSH keys to install during the provisioning process.

    Adding SSH Keys to an Existing Server

    Via the Dashboard

  • Navigate to your server's dashboard.
  • Go to the Settings or SSH Keys tab.
  • Click Add SSH Key and select a key from your account or paste a new one.
  • Via the Command Line

    Connect to your server with your current authentication method and add the public key manually:

    bash
    # Create the .ssh directory if it does not exist
    mkdir -p ~/.ssh
    chmod 700 ~/.ssh

    Add the public key to authorized_keys

    echo "ssh-ed25519 AAAA... [email protected]" >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys

    Replace the key content with your actual public key.

    Using ssh-copy-id

    The easiest command-line method to install your key on a server:

    bash
    ssh-copy-id -i ~/.ssh/id_ed25519.pub [email protected]

    This copies your public key to the server's ~/.ssh/authorized_keys file automatically.

    Removing an SSH Key

    From Your Data Mammoth Account

  • Go to Account Settings > SSH Keys.
  • Find the key you want to remove.
  • Click Delete or the trash icon.
  • Removing a key from your account does not automatically remove it from servers where it was already installed.

    From a Server

    Connect to the server and edit the authorized keys file:

    bash
    nano ~/.ssh/authorized_keys

    Delete the line containing the key you want to remove, save, and exit.

    Managing Multiple SSH Keys

    If you use different keys for different purposes, configure your SSH client to use the correct key for each server:

    Create or edit ~/.ssh/config:

    text
    Host my-vps
        HostName 203.0.113.10
        User root
        IdentityFile ~/.ssh/id_ed25519_datamammoth

    Host staging-server HostName 203.0.113.20 User deploy IdentityFile ~/.ssh/id_ed25519_staging

    Then connect using the alias:

    bash
    ssh my-vps

    Troubleshooting SSH Key Issues

    "Permission denied (publickey)"

    This means the server rejected your key. Common causes:

  • Wrong key — Ensure the correct public key is in ~/.ssh/authorized_keys on the server.
  • Wrong permissions — Fix file permissions:
  • bash
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys

  • Wrong user — Make sure you are connecting as the correct user (e.g., root vs. a regular user).
  • SSH agent — If using an SSH agent, ensure your key is loaded: ssh-add -l.
  • Key Not Being Offered

    If SSH is not trying your key, specify it explicitly:

    bash
    ssh -i ~/.ssh/id_ed25519 [email protected]

    Or add it to your SSH agent:

    bash
    ssh-add ~/.ssh/id_ed25519

    What to Do Next

    • SSH Key Best Practices — Advanced security recommendations for SSH keys.
    • Initial Server Setup — Ubuntu 22.04/24.04 — Secure your server from the start.
    • Using the Web Console (VNC/NoVNC) — Access your server when SSH is not working.
    • Enable 2FA — Protect Your Account — Add another layer of account security.

    Was this article helpful?

    ← Back to Server ManagementBrowse all categories →

    Still have questions?

    Contact Support →Submit a Ticket