3 ms·
For setting up a remote computer for SSH key login I use this little snippet that I think I found on HN not too long ago cat ~/.ssh/id_rsa.pub | ssh USER@H
by joshstrange 14y ago
For setting up a remote computer for SSH key login I use this little snippet that I think I found on HN not too long ago
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "cat >> .ssh/authorized_keys"
Of course the receiving server mush have a ".ssh" folder in the user folder and "authorized_keys" must exist "touch ~/.ssh/authorized_keys" but it is a super easy way to add your key to the remote server. Just thought I would share, I hope someone else finds it useful.
- viraptor 14y agoNew openssh already has this covered in a more standardised way: ssh-copy-id USER@HOST