Client Login

SSH Key Guide

You can log in to your SSH app with a key instead of typing your password each time. Setup takes about five minutes, and your password keeps working as a backup.

1. Your connection details

You’ll need these from your SSH app details. In the commands below, replace USERNAME, PORT and SERVER with your own values.

ServerSERVER, for example nl5511.dediseedbox.com
PortPORT, your SSH app’s port
UsernameUSERNAME
PasswordYour SSH app password, needed once to add your key

2. Create a key on your computer

Skip this section if you already have a key. You can check with ls ~/.ssh/id_ed25519.pub on Mac or Linux, or dir $env:USERPROFILE\.ssh\id_ed25519.pub in Windows PowerShell.

  1. Open a terminal (Mac or Linux) or PowerShell (Windows).
  2. Run:
    ssh-keygen -t ed25519
  3. Press Enter to accept the default location.
  4. Enter a passphrase when asked. This is recommended, because it protects your key if your computer is ever lost or stolen.

This creates two files:

  • id_ed25519 is your private key. Never share it or copy it anywhere.
  • id_ed25519.pub is your public key. This is the one you add to your SSH app.

Using PuTTY? Skip to option C in the next section. PuTTY makes its own keys.

3. Add your key to your SSH app

Your keys are kept in one file: /downloads/Apps/SSH/authorized_keys. Pick whichever option suits you.

Option A: Mac or Linux

cat ~/.ssh/id_ed25519.pub | ssh -p PORT USERNAME@SERVER "cat >> /downloads/Apps/SSH/authorized_keys"

Enter your password when asked. That’s the last time you’ll need it.

Option B: Windows PowerShell

Type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh -p PORT USERNAME@SERVER "cat >> /downloads/Apps/SSH/authorized_keys"

Enter your password when asked. That’s the last time you’ll need it.

ssh-copy-id doesn’t work with your SSH app, because it saves keys to a different place. Use the commands above instead.

Option C: PuTTY

PuTTY uses its own key format, made with PuTTYgen.

  1. Open PuTTYgen. Click Load to open a key you already have, or choose EdDSA (Ed25519) and click Generate to make a new one.
  2. Click Save private key to save a .ppk file.
  3. Copy all the text in the box labelled Public key for pasting into OpenSSH authorized_keys file.
  4. Log in to your SSH app with your password, then open your key file:
    nano /downloads/Apps/SSH/authorized_keys
  5. Paste the key on its own line, then press Ctrl+O, Enter and Ctrl+X to save and exit.
  6. In PuTTY, go to Connection → SSH → Auth → Credentials and select your .ppk file under Private key file for authentication.
  7. Go back to Session, enter your server and port, and click Save so you don’t have to set this up again.

Don’t use PuTTYgen’s Save public key button for this. It saves the key in a format your SSH app won’t accept.

Option D: File manager or SFTP

Edit the file directly from your file manager or SFTP app.

  1. Open /downloads/Apps/SSH/.
  2. Open authorized_keys in a text editor, or create it if it isn’t there. The name has no file extension.
  3. Paste your public key on its own line and save.

4. Test your key

Your key works straight away. Log in as usual:

ssh -p PORT USERNAME@SERVER

If you get in without being asked for your password, you’re done. If you set a passphrase, you’ll be asked for that instead, which is expected.

To confirm it’s definitely using your key and not your password:

ssh -p PORT -o PasswordAuthentication=no USERNAME@SERVER

Optional shortcut: add this to ~/.ssh/config on your computer, and you can then connect with just ssh seedbox. Rsync, scp and SFTP apps use it too.

Host seedbox
    HostName SERVER
    Port PORT
    User USERNAME
    IdentityFile ~/.ssh/id_ed25519

5. Managing your keys

  • Another computer: create a key on it and add it the same way. Each key goes on its own line in /downloads/Apps/SSH/authorized_keys.
  • Remove a key: delete its line from /downloads/Apps/SSH/authorized_keys. Do this straight away if a device is lost or you no longer use it.
  • Restarting your SSH app: your keys are kept, so there’s nothing to do.
  • Reinstalling your SSH app: this removes your keys and can give you a new port. Your password still works, so log in with it, then add your key again.

6. Troubleshooting

  • Still asked for your passwordCheck your key is in the right file with cat /downloads/Apps/SSH/authorized_keys, including the exact name with no file extension. Then check each key is a single unbroken line starting with ssh-ed25519 or ssh-rsa. Copying from some terminals splits long lines.
  • The line starts with “—–BEGIN” or “—- BEGIN SSH2”That’s the wrong format. “—–BEGIN” is a private key, so delete it straight away and create a new key pair. “—- BEGIN SSH2” came from PuTTYgen’s Save public key button; replace it with the text from the “Public key for pasting” box.
  • “Server refused our key” in PuTTYThe key in PuTTY doesn’t match one in /downloads/Apps/SSH/authorized_keys. Load your .ppk in PuTTYgen and copy the “Public key for pasting” text into the file again.
  • Your key isn’t in the default locationPoint to it when connecting: ssh -i /path/to/key -p PORT USERNAME@SERVER.
  • You used ssh-copy-idIt saved your key somewhere your SSH app doesn’t look. Add it again using one of the options in section 3.
  • Still stuckRun ssh -v -p PORT USERNAME@SERVER and send the output to support. It never contains your private key.

→ Keep your private key private. Only ever copy the .pub file or PuTTYgen’s “Public key for pasting” text. If you think your private key has been seen by anyone else, remove it from /downloads/Apps/SSH/authorized_keys and create a new one.

Popular KB Articles