# Headscale # exercise to assert that it works ## 1. Create VMs python3 vm.py c mk testvm2-1 --image fedora42 --vcpu 6 --ram 4 --auto-download python3 vm.py c mk testvm2-2 --image fedora42 --vcpu 6 --ram 4 --auto-download ## 2. Check available public IPs python3 vm.py n ipv4 --pool ## 3. Attach public IP to server VM python3 vm.py n ipv4 --attach 37.27.166.243 testvm2-1 ## 4. SCP install.sh to server VM and run it scp -i ~/k/k1 -o StrictHostKeyChecking=no /root/hypervisor/vm-claude/headscale/install.sh user@:/tmp/install.sh sshi testvm2-1.i "sudo bash /tmp/install.sh 37.27.166.243" # Output includes the auth key, e.g.: # hskey-auth-JK4Q793swFSJ-owovbUSFU1T71UyRiywcrIgERltcWq14h6vXT2LIFFA1naYkKLLGfL8E46cgUTOQ ## 5. SCP client.sh to client VM and run it scp -i ~/k/k1 -o StrictHostKeyChecking=no /root/hypervisor/vm-claude/headscale/client.sh user@:/tmp/client.sh sshi testvm2-2.i "sudo bash /tmp/client.sh 37.27.166.243 " ## 6. Verify - ping server's tailscale IP from client sshi testvm2-2.i "ping -c 3 100.64.0.1" ## Cleanup python3 vm.py n ipv4 --detach 37.27.166.243 testvm2-1 echo "y" | python3 vm.py c rm testvm2-1 echo "y" | python3 vm.py c rm testvm2-2 ## Useful commands on the headscale server VM headscale node list # list all registered nodes headscale users list # list users headscale preauthkeys create --user --expiration 2160h --reusable # new auth key headscale preauthkeys list --user # list auth keys curl http://:8080/health # health check