Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- On your computer, generate a key with the following command:
- - ssh-keygen -t rsa
- Walk through the steps, passphrase is optional.
- Publish the key to remote:
- - cat ~/.ssh/id_rsa.pub | ssh user@123.45.67.89 "cat >> ~/.ssh/authorized_keys"
- When you get the output that the folder does not exist, use the following command:
- - cat ~/.ssh/id_rsa.pub | ssh user@123.45.67.89 "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
- Verify that it all works with:
- - ssh user@123.45.67.89
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement