Files
docker-docs/_includes/content/ssh/ssh-copy-key.md
Victoria Bialas e90b12c425 Added <hr>'s below tabbed topics for SSH and test page (#4232)
* added <hr>'s below tabs

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* update Tabs topic on test.md to show use of <hr>'s

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>

* added more information about toc_max/min

Signed-off-by: Victoria Bialas <victoria.bialas@docker.com>
2017-08-16 19:38:09 -07:00

2.0 KiB

  • Mac
  • Windows
  • Linux

{% capture mac-content-copy %}

Copy the public SSH key to your clipboard.

$ pbcopy < ~/.ssh/id_rsa.pub

If your SSH key file has a different name than the example code, modify the filename to match your current setup.

Tip: If you don't have pbcopy, you navigate to the hidden .ssh folder, open the file in a text editor, and copy it to your clipboard. For example: $ atom ~/.ssh/id_rsa.pub

{% endcapture %} {{ mac-content-copy | markdownify }}



{% capture win-content-copy %}

Copy the public SSH key to your clipboard.

$ clip < ~/.ssh/id_rsa.pub

If your SSH key file has a different name than the example code, modify the filename to match your current setup.

Tip: If clip doesn't work, navigate the hidden .ssh folder, open the file in a text editor, and copy it to your clipboard. For example: $ notepad ~/.ssh/id_rsa.pub

{% endcapture %} {{ win-content-copy | markdownify }}



{% capture linux-content-copy %}

If you don't already have it, install xclip. (The example uses apt-get to install, but you might want to use another package installer like yum.)

$ sudo apt-get install xclip

Copy the SSH key to your clipboard.

$ xclip -sel clip < ~/.ssh/id_rsa.pub

Tip: If you xclip isn't working, navigate to hidden .ssh folder, open the file in a text editor, and copy it to your clipboard. For example: $ vi ~/.ssh/id_rsa.pub

{% endcapture %} {{ linux-content-copy | markdownify }}