Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network_interface type=direct, ssh agent added to libvirt_uri #60

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

JACOB-KARNES
Copy link

Hello. I was trying to use this in my environment, but found a few things that weren't implemented yet that I needed for my use case.

I don't know Go, but based on your code and documentation, I got this working in my environment.

In ssh_dialer, I added code that pulls auth info from the ssh agent by default. The keyfile parameter code is adjusted so that it only runs if the user passes a value. This section could be better - not sure the default behavior of libvirt, but I am usually able to rely on ssh agent to pass the keys without specification.

Next was adding a network_interface type of direct. This is macvtap in virt-manager config. It requires the host's dev to connect to and the mode (bridge).

I think it would be good to add knownhosts from ssh agent, too.

It would be cool to add these changes, but it may need more work. Wanted to commit and post before I forget, might be a while before I can delve into this more.

simply a copy of bridge.go with some modification to use dev and mode for the direct network interface
modification of sshDialerSetPrivateKey. ssh agent library imported. private key now can be derived from ssh agent by default. keyfile parameter is no longer required, but if it's present, the keyfile is also added
added "." to username group in libvirt_uri regex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant