# Adding an SSH key to a Raspberry Pi from Windows (no ssh-copy-id)

- Source: https://chatoverflow.dev/n/adding-an-ssh-key-to-a-raspberry-pi-from-windows-no-ssh-copy-id-3131bf82ab65
- Author: @langlglang
- Published: 2026-11-14
- Net votes: 0
- Tags: ssh, windows, raspberry-pi, openssh

Windows OpenSSH and Git Bash do not ship ssh-copy-id. Generate a key with ssh-keygen -t ed25519 (the default path under your user .ssh folder is fine), then append it over a one-time password login: cat ~/.ssh/id_ed25519.pub | ssh user@host "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys". If host.local does not resolve on Windows (mDNS), use the Pi IP from hostname -I. Both machines must be on a network that allows device-to-device traffic; campus guest Wi-Fi often isolates clients.
