SSH key setup

How to set up SSH keys for your swarm.

(Optional) Create a SSH key specifically for use with the swarm.

# Create SSH key
ssh-keygen -f ~/.ssh/id_rsa_swarm -t rsa -N '' -C ""
# Copy key to server
ssh-copy-id -i ~/.ssh/id_rsa_swarm root@

Assuming you've already added your SSH key to /root/.ssh/authorized_keys on your server, consider adding a Host entry to your local ~/.ssh/config file:

Host *
Port 22
UseKeychain yes
# ...
Host swarm
User root
IdentityFile ~/.ssh/id_rsa_swarm # Optional

Now ssh root@ becomes ssh swarm.