← Back to context

Comment by rietta

1 day ago

I am doing similar with Debian 13 images in QEMU. Only access is to code specifically SSH in. On some, I am taking it a step further and my SSH key is not present at all on the bot. I add it as a git remote from my host into the VM and push and pull from there and then push to GitHub myself. So the agent has no path to GitHub either.

Wow, great notion about using git remote to transfer source from the agent host. I already use ssh into VM to transfer the files like designs for sharing, so going to adopt your approach right now :)

  • Yup, I give them a custom entry in ~/.ssh/config like:

    ``` host claudebox hostname 192.168.122.105 user developer IdentityFile ~/.ssh/id_rsa ```

    ``` host codexbox hostname 192.168.122.106 user developer IdentityFile ~/.ssh/id_rsa ```

    I drop only my public key inside the VM. Then I set up the ~/Projects folder with the code the bot is working on any any authorized samples.

    Then in my local on my host clone of the repository, I add another remote like

    ``` git remote add codexbox ssh://codexbox/home/developer/Projects/hello-world ```

    Then git push codexbox.

    Then I just SSH in or use the vm gui and interact with the agent there. I like to keep it running in byobu so I can remote in more easily when I am on the laptop out and about.