Contents

How to Log in to a DMIT VPS Using SSH Keys (Windows 11 & Linux)

DMIT VPS instances only allow SSH key authentication and do not support password login.
This guide explains how to generate SSH keys on Windows 11 and Linux (Ubuntu/Debian), upload the public key to the DMIT control panel, and securely log in to your VPS.


Prerequisites

  • Local machine: Windows 11 Pro (or Ubuntu 24.04 LTS)
  • Remote VPS: Debian 12
  • VPS provider: DMIT.TYO.Pro.Shinagawa

Step 1: Generate an SSH Key Pair (Windows 11)

Open PowerShell (Windows Terminal) and run:

ssh-keygen -t ed25519 -C "win11-vpsdeck-2025-09-02" -f "$env:USERPROFILE\.ssh\id_ed25519"
  • When prompted for Enter passphrase, it is recommended to set a secure passphrase.
  • If you prefer passwordless login, press Enter to skip.

The generated files will be located at:

  • Private key: C:\Users\<YourUser>\.ssh\id_ed25519
  • Public key: C:\Users\<YourUser>\.ssh\id_ed25519.pub

Step 2: Copy the Public Key

Run the following command to copy the public key into your clipboard:

Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub" | Set-Clipboard
  • The public key should start with ssh-ed25519 and must be a single line.
  • Example:
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI... win11-vpsdeck-2025-09-02

Step 3: Upload the Public Key to DMIT Control Panel

    1. Log in to the DMIT control panel.
    1. Navigate to your VPS → Access → Change SSH Key.
    1. Paste the entire public key into the field and save.
    1. Apply the key to the VPS. In some cases, you may need to reboot the VPS for changes to take effect.

⚠️ Note: DMIT does not allow password login. SSH key authentication is the only way to access your VPS.


Step 4: Log in to the VPS (Windows)

Use the private key you generated to log in:

ssh -i "$env:USERPROFILE\.ssh\id_ed25519" root@<VPS_IP>
  • The default username is usually root.
  • If you set a passphrase earlier, you will be prompted to enter it.

Step 5: Generate SSH Keys on Linux (Ubuntu/Debian)

If you prefer to generate the keys on a Linux machine:

ssh-keygen -t ed25519 -C "ubuntu-vpsdeck-2025-09-02" -f ~/.ssh/id_ed25519
  • Press Enter to accept defaults.

  • Keys will be stored in:

    • ~/.ssh/id_ed25519 (private)
    • ~/.ssh/id_ed25519.pub (public)

View and copy the public key:

cat ~/.ssh/id_ed25519.pub

Upload it to the DMIT control panel as described in Step 3.


Step 6: Log in to the VPS (Linux)

Once the key has been applied, log in with:

ssh -i ~/.ssh/id_ed25519 root@<VPS_IP>

Troubleshooting

  • “Server refused our key” error

    • Ensure the public key was pasted as one single line.
    • Check file permissions on the VPS:
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
    chown -R <user>:<user> ~/.ssh
  • Wrong username

    • For DMIT Debian images, the default user is usually root.
    • If root fails, check your provider’s documentation.

Conclusion

By following this guide, you can securely log in to your DMIT VPS using SSH key authentication on both Windows 11 and Linux. This approach eliminates password login, improves security, and follows best practices recommended by DMIT.