Difference between revisions of "SBN - Copying Certs"

From The TinkerNet Wiki
Jump to navigation Jump to search
(Created page with "To copy certs for a machine from your proxy server (Replace '''Machine.Domain.TLD''' with the proper name for your machine...) (&, of course, '''user''' & '''webserver''' may...")
 
Line 1: Line 1:
 
To copy certs for a machine from your proxy server (Replace '''Machine.Domain.TLD''' with the proper name for your machine...) (&, of course, '''user''' & '''webserver''' may need adjusting...)
 
To copy certs for a machine from your proxy server (Replace '''Machine.Domain.TLD''' with the proper name for your machine...) (&, of course, '''user''' & '''webserver''' may need adjusting...)
  
# Install certbot on the machine you're putting the certs onto.
+
#Install certbot on the machine you're putting the certs onto & create the <code>live</code> directory where the certs will live.
#* sudo apt in  all certbot
+
#*<code>sudo apt in  all certbot</code>
#* <br />s
+
#*<code>sudo mkdir /etc/letsencrypt/live</code>
 
+
#Sign into your proxy server & make sure you can SSH into the target machine from there.
*First, make sure you can SSH into the proxy server from your proxy server
+
#*<br />
**<code>ssh Machine</code>
+
#**<code>ssh Machine</code>
**then exit when you've succeeded (this tells CertGetter how to get there...)
+
#**then exit when you've succeeded (this tells CertGetter how to get there...)
*Then you can use '''scp''' to copy the certs.
+
#Then you can use '''scp''' to copy the certs.
**<code>sudo scp -r /etc/letsencrypt/live/Machine.Domain.TLD user@Machine:~</code>
+
#*<code>sudo scp -r /etc/letsencrypt/live/Machine.Domain.TLD user@Machine:~</code>
*Then ssh back into the proxy server & move the certs into their proper location
+
#Then ssh back into the proxy server & move the certs into their proper location
**<code>sudo mv Machine.Domain.TLD /etc/letsencrypt/live/</code>
+
#*<code>sudo mv Machine.Domain.TLD /etc/letsencrypt/live/</code>

Revision as of 03:18, 11 July 2020

To copy certs for a machine from your proxy server (Replace Machine.Domain.TLD with the proper name for your machine...) (&, of course, user & webserver may need adjusting...)

  1. Install certbot on the machine you're putting the certs onto & create the live directory where the certs will live.
    • sudo apt in all certbot
    • sudo mkdir /etc/letsencrypt/live
  2. Sign into your proxy server & make sure you can SSH into the target machine from there.

      • ssh Machine
      • then exit when you've succeeded (this tells CertGetter how to get there...)
  3. Then you can use scp to copy the certs.
    • sudo scp -r /etc/letsencrypt/live/Machine.Domain.TLD user@Machine:~
  4. Then ssh back into the proxy server & move the certs into their proper location
    • sudo mv Machine.Domain.TLD /etc/letsencrypt/live/