# add a peer Say we want to connect two computers via wireguard. We will call them **one** and **two**. ## one on one, run the following command to add a new host: ``` sudo wg set wg0 peer ${two_pubkey:?} endpoint ${two_public_ip:?}:${two_port:?} allowed-ips ${two_wg_ip:?}/32 ``` if we also want to be able to refer to the host by an easy to remember name rather than just an IP, we can also add it to `/etc/hosts`