Skip to content

Instantly share code, notes, and snippets.

@anton-petrov
Created February 13, 2023 17:30
Show Gist options
  • Save anton-petrov/f1cdea5b713f79a112a7898c33ec699b to your computer and use it in GitHub Desktop.
Save anton-petrov/f1cdea5b713f79a112a7898c33ec699b to your computer and use it in GitHub Desktop.
Copy SSH Public Key from Windows to Ubuntu
Windows host:
cp C:\Users\anton\.ssh\id_rsa.pub C:\Users\anton\authorized_keys
cd C:\Users\anton\
scp authorized_keys [email protected]:~/.ssh
Ubuntu host:
service ssh status Start sshd if necessary
mkdir ~/.ssh/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment