Skip to content

Instantly share code, notes, and snippets.

View Elyorbe's full-sized avatar
🏓

Elyorbek Ibrokhimov Elyorbe

🏓
View GitHub Profile
@Elyorbe
Elyorbe / ssh-copy-id-win
Created October 22, 2021 06:51
ssh-copy-id for windows
# First generate public/private key if doesn't exists
ssh-keygen
# For PowerShell
type $ENV:USERPROFILE\.ssh\id_rsa.pub | ssh username@host "cat >> .ssh/authorized_keys"
# For CMD
type %USERPROFILE%\.ssh\id_rsa.pub | ssh username@host "cat >> .ssh/authorized_keys"