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

How to create remote connection from Windows? #3

Open
Alex-1357 opened this issue Dec 15, 2021 · 2 comments
Open

How to create remote connection from Windows? #3

Alex-1357 opened this issue Dec 15, 2021 · 2 comments

Comments

@Alex-1357
Copy link

Hello, this is a question, maybe not an issue. LibVirtAuthentication is only an abstract class, and how to pass login/pass/rsakey for it?

Using Connection = LibvirtConnection.Create.Connect("qemu+ssh://root@144.XX.XX.107/system?keyfile=id_rsa", _and_??_)

or

 Using Connection = LibvirtConnection.Create.WithCredentials( _and_??_).Connect()
@Alex-1357
Copy link
Author

Ups, sorry, I found signature.

         New OpenAuthPasswordAuth With {.Username = "root", .Password = "XXX"})

@Alex-1357
Copy link
Author

And how to connect to remote host? I don't understand.

 Connect("qemu+ssh://root@144.XX.XX.107/")

get me this error:

Libvirt.LibvirtConnectionException
  HResult=0x80131500
  Message=VIR_ERR_ERROR #VIR_ERR_INVALID_ARG invalid argument: transport methods unix, ssh and ext are not supported under Windows invalid argument: %s transport methods unix, ssh and ext are not supported under Windows
  Source=libvirt-dotnet
  StackTrace:
   at Libvirt.LibvirtConnection..ctor(IntPtr conn, LibvirtConfiguration configuration)
   at Libvirt.LibvirtConfiguration.Libvirt.IConfigurationBuilder.Connect(String uri, LibvirtAuthentication auth)
   at LibvirtNetCoreWrapper.Program.Main(String[] args) in E:\Projects\CryptoChestMax\LibvirtNetCoreWrapper\LibvirtNetCoreWrapper\Program.vb:line 7

and

Connect("qemu://root@144.XX.XX.107/")

get me this error:

Libvirt.LibvirtConnectionException
  HResult=0x80131500
  Message=VIR_ERR_ERROR #VIR_ERR_SYSTEM_ERROR Cannot read CA certificate '/usr/i686-w64-mingw32/sys-root/mingw/etc/pki/CA/cacert.pem': No such file or directory %s Cannot read CA certificate '/usr/i686-w64-mingw32/sys-root/mingw/etc/pki/CA/cacert.pem': No such file or directory
  Source=libvirt-dotnet
  StackTrace:
   at Libvirt.LibvirtConnection..ctor(IntPtr conn, LibvirtConfiguration configuration)
   at Libvirt.LibvirtConfiguration.Libvirt.IConfigurationBuilder.Connect(String uri, LibvirtAuthentication auth)
   at LibvirtNetCoreWrapper.Program.Main(String[] args) in E:\Projects\CryptoChestMax\LibvirtNetCoreWrapper\LibvirtNetCoreWrapper\Program.vb:line 7

@Alex-1357 Alex-1357 changed the title How to pass Login/Pass/RsaKey to remote connection? How to create remote connection? Dec 16, 2021
@Alex-1357 Alex-1357 changed the title How to create remote connection? How to create remote connection from Windows? Dec 16, 2021
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

No branches or pull requests

1 participant