Back to guides
Authentication

SSH Keys

Replace password login with an SSH private key for safer long-term Redock access.

Password login is convenient for the first connection. For daily use, prefer SSH keys, especially for Tailscale, VPS, ngrok, or any public endpoint.

Generate a Key in Redock

  1. Add or edit a Host in Redock.
  2. Set Auth to SSH Key.
  3. Choose Generate Key.
  4. Copy the public key shown by Redock.
  5. Add that public key to the remote host.

On macOS, paste the Redock public key into the clipboard. First check whether authorized_keys already exists:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
ls -la ~/.ssh/authorized_keys

Most developer machines already have this file. If it exists, append the Redock public key directly:

pbpaste >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

If the file does not exist, create it once, then append the key:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
pbpaste >> ~/.ssh/authorized_keys

On Linux, check the same file first:

mkdir -p ~/.ssh
chmod 700 ~/.ssh
ls -la ~/.ssh/authorized_keys

If it exists, append or paste the Redock public key into it:

nano ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

Import an Existing Private Key

If you already have a private key:

  1. Confirm the matching public key is present on the remote host.
  2. Import the private key into Redock.
  3. Enter the passphrase if the private key is encrypted.
  4. Save the Host and test the connection.

The public key belongs on the remote host. The private key stays in Redock.

Permission Checklist

SSH is strict about file permissions. Use:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

If a private key file exists on the remote host for your own testing, use:

chmod 600 ~/.ssh/id_ed25519

Safer Defaults

  • Use SSH keys for public endpoints.
  • Restrict macOS Remote Login to only the users you need.
  • Avoid weak passwords.
  • Keep separate Redock Hosts for LAN, Tailscale, ngrok, and VPS access instead of repeatedly editing one Host.
  • Remove old keys from authorized_keys when you no longer use them.

Troubleshooting

  • Authentication failed: verify Username, key pair, passphrase, and authorized_keys.
  • Permission denied: check ~/.ssh and authorized_keys permissions.
  • Wrong account: Username must be the remote system username, not an email or Apple ID.
  • Key pasted incorrectly: each public key should be one full line in authorized_keys.

Try Redock while following this guide

Steer coding agent and work on your phone.

Get Redock Free