Skip to content
jluzuria2001 edited this page May 6, 2016 · 2 revisions

Welcome to the codeSnippets wiki!

Share your Public Key with the other well-known hosts

  1. Generate it
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
  1. to see the RSA key
$ ls -l ~/.ssh
$ ssh-add -l
4096 SHA256:7/vuTHmRkcJpFQF2u7cY8tQQuFP0QVvNZAcywmjcNlY your_email@example.com (RSA)
$ eval `ssh-agent -s`
$ ssh-add
  1. Share it
$ cat ~/.ssh/id_rsa.pub | ssh user@host 'cat >> ~/.ssh/authorized_keys'
# on RPi1
cat ~/.ssh/id_rsa.pub | ssh pi@192.168.1.48 'cat >> ~/.ssh/authorized_keys'
#on RPi2
cat ~/.ssh/id_rsa.pub | ssh pi@192.168.1.41 'cat >> ~/.ssh/authorized_keys'

Clone this wiki locally