You are not logged in.

#1 2014-08-13 03:37:15

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

[SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

I have a libvirt + qemu/kvm setup that I can remote into with ssh. The initial ssh connection to the server is fine. However, when I want to view the VM, it prompts me for my ssh passphrase literally 10 times. The funny thing is, it actually works after that...

Any thoughts on the cause? I'm not sure what config files would be relevant here.

All the ssh connections!

Last edited by Hspasta (2014-08-13 20:59:38)

Offline

#2 2014-08-13 04:43:02

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

Does using ssh verbosely help with the debugging?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2014-08-13 06:20:24

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

I actually found out that running virt-manager under gnome doesn't require you to authenticate anymore past the initial connection to the server. The behavior in my previous post was from i3 although I don't understand why I would have this issue even after booting through gdm.

I guess this is partially solved. I need to figure out how the ssh credentials get cached in gnome so that I don't have to type my passphrase ten times in i3...

Offline

#4 2014-08-13 17:00:47

Name Taken
Banned
Registered: 2014-04-09
Posts: 113

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

Use SSH keyfile to never be prompted.

Offline

#5 2014-08-13 20:59:27

Hspasta
Member
Registered: 2011-12-24
Posts: 189
Website

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

I'm not sure what you mean by ssh keyfile, but I setup gnome-keyring for i3 and it works!

Offline

#6 2014-08-13 21:22:13

Name Taken
Banned
Registered: 2014-04-09
Posts: 113

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

SSH keys serve as a means of identifying yourself to an SSH server using public-key cryptography and challenge-response authentication. One immediate advantage this method has over traditional password authentication is that you can be authenticated by the server without ever having to send your password over the network.

Last edited by Name Taken (2014-08-13 21:22:26)

Offline

#7 2014-09-08 11:41:35

usprey
Member
Registered: 2013-07-09
Posts: 11

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

Same problem here with i3 and virt-manager.

I use keychain to load my ssh-key and would like to avoid gnome-keyring, and will appreciate help in narrowing down the problem.

Offline

#8 2015-04-21 20:57:23

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: [SOLVED]Libvirt: Need to ssh x10 Times Before Connecting to VM

Awesome wm and virt-manager here.

Adding something like this to .xinit works for virt-manager but it'll ask for ssh passphrase right after startx command.

~/.xinitrc
keychain ~/.ssh/id_ecdsa
[ -f ~/.keychain/$HOSTNAME-sh ] && . ~/.keychain/$HOSTNAME-sh 2>/dev/null
[ -f ~/.keychain/$HOSTNAME-sh-gpg ] && . ~/.keychain/$HOSTNAME-sh-gpg 2>/dev/null
...
exec awesome

Offline

Board footer

Powered by FluxBB