You'll need a second machine similar to the one you have been using so far (either a cloud instance, a Vagrant VM, or a physical machine, whichever is convenient). Install Puppet and its dependencies as you did for the first machine in Chapter 2, First steps with Puppet, in the Time for action – preparing for Puppet and Time for action – installing Puppet sections.
Once the machine is set up, create the
git
user:ubuntu@demo2:~$ sudo useradd -m git
Create a
.ssh
directory and private key file, and set appropriate permissions:ubuntu@demo2:~$ sudo su - git git@demo2:~$ mkdir .ssh git@demo2:~$ chmod 700 .ssh git@demo2:~$ touch .ssh/id_rsa git@demo2:~$ chmod 600 .ssh/id_rsa
On your first server, display the SSH private key for
git
and copy it to the clipboard:ubuntu@demo:~$ sudo cat ~git/.ssh/id_rsa -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEA1wR9i+bkwsNIcyd1ojhBH13ecuOhGfoJpjdjSjocBjf2fJRa ... GOTLXyqpcrez/Ijbc9TJsaFNisnb1HqBR31J/N2StjHmwjtOmlwL...