How to copy public key?

  • 1
  • Question
  • Updated 9 years ago
How to copy public key? I generated public key by ssh-keygen. I have file 'id_rsa.pub', 'id_rsa' and 'known_hosts'. As far as i understand, we supposed to copy that id_rsa.pub to remote server. However i phonegap build it seems as if I have to manually copy the code from id_rsa.pub? Meaning that I should use some editor like 'vim or pico' in terminal to open id_rsa.pub. Is it correct? thank you.
Photo of Joy Nareerat

Joy Nareerat

  • 4 Posts
  • 0 Reply Likes

Posted 9 years ago

  • 1
Photo of Andrew Lunny

Andrew Lunny

  • 1911 Posts
  • 199 Reply Likes
Yes. If you're on a Mac, you can copy the key to your clipboard with the following command:

cat ~/.ssh/id_rsa.pun | pbcopy
Photo of Joy Nareerat

Joy Nareerat

  • 4 Posts
  • 0 Reply Likes
thanks. it really helps me