RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1130077 - Unable to get the vm console while trying to connect to the KVM host through ssh option from remote virt-manager.
Summary: Unable to get the vm console while trying to connect to the KVM host through ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-14 09:36 UTC by Udayendu Sekhar Kar
Modified: 2018-12-09 18:21 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-22 12:28:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Error message showing wheile trying to access the VM's console. (45.85 KB, image/jpeg)
2014-08-14 09:37 UTC, Udayendu Sekhar Kar
no flags Details
Logs before using ssh-keygen for passwordless ssh. (7.32 KB, text/plain)
2014-08-14 09:39 UTC, Udayendu Sekhar Kar
no flags Details
Logs after using ssh-keygen for passwordless ssh. (11.37 KB, text/plain)
2014-08-14 09:39 UTC, Udayendu Sekhar Kar
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1165553 0 None None None Never

Description Udayendu Sekhar Kar 2014-08-14 09:36:43 UTC
Description of problem:
Unable to get the vm console while trying to connect to the KVM host through ssh option from remote virt-manager. Both KVM host and the client system(where running virt-manager) are in RHEL7 with same qemu-kvm and same virt-manager.

Version-Release number of selected component (if applicable):
RHEL7
qemu-kvm-common-1.5.3-60.el7_0.5.x86_64
qemu-kvm-1.5.3-60.el7_0.5.x86_64
virt-manager-common-0.10.0-20.el7.noarch
virt-manager-0.10.0-20.el7.noarch
openssh-askpass-6.4p1-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install a RHEL7 KVM host and create a VM 
2. Install another RHEL7 system and install virt-manager and try to connect to the KVM host using the ssh option of the virt-manager
3. While trying it will ask to provide password as 'openssh-askpass' package is installed.
4. After giving passowrd client virt-manager will be connected to the KVM host. Then try to take the console, it will show blank or some time the error message as attached to this bugzilla.
5. But if will do a passwordless connecttion between the virt-manager client system and the KVM host and then will try to collect, its working perfectly.

Actual results:
With openssh-askpass option its not working but without passowrd its working perfectly.

Expected results:
With both option it should work.

Additional info:
Initially for 2-3 time I got the below error message:
---
SSH password dialog could not grab the keyboard input.This might be caused by application such as screensaver, however it could also mean that someone may be eavesdropping on your session.Either close the application which grabs the keyboard or log out and log in again to prevent this from happening
---

Comment 1 Udayendu Sekhar Kar 2014-08-14 09:37:33 UTC
Created attachment 926726 [details]
Error message showing wheile trying to access the VM's console.

Comment 2 Udayendu Sekhar Kar 2014-08-14 09:39:16 UTC
Created attachment 926727 [details]
Logs before using ssh-keygen for passwordless ssh.

Comment 3 Udayendu Sekhar Kar 2014-08-14 09:39:49 UTC
Created attachment 926728 [details]
Logs after using ssh-keygen for passwordless ssh.

Comment 5 Giuseppe Scrivano 2014-08-20 07:34:39 UTC
how do you run virt-manager?  If you run virt-manager from a terminal, you could get the password prompt there.

Comment 6 Udayendu Sekhar Kar 2014-08-20 10:57:21 UTC
Hello Giuseppe,

Please find the reply to your below query:

>> how do you run virt-manager?

   - On a client system virt-manager packages are installed.
   - So just use 'Alt+F2' and run virt-manager to open the virt-manager gui.
   - Then go to:
      File -> Add Connection -> Hypervisor(QEMU/KVM) -> Enable "Connect to remote host" -> MEthod(SSH) -> Username (root) -> Hostname(remote KVM host IP where the VM is running) 

 Then try to connect.

These are the steps I am following and experiencing this issue as mentioned in the description of this bugzilla.

Feel free to let me know if you need more information or logs. Its 100% reproducible.

Regards,
Udayendu

Comment 7 Giuseppe Scrivano 2014-08-20 13:39:34 UTC
this should not happen anymore with the upstream version as ssh connections were serialized.  We are going to rebase virt-manager in RHEL-7.1

Comment 9 CongDong 2014-09-10 07:25:20 UTC
I test with virt-manager-0.10.0-20.el7.noarch on both hosts

Steps

1. open virt-manager on client system
# virt-manager
2. connect target host
File -> Add connection -> check connect to remote host -> file hostname -> Click Connect
3. double click to open the guest
4. open ssh dialog will come out and need to type password

Result:
The ssh dialog will come out 4 times, always get the error msg in description:
---
SSH password dialog could not grab the keyboard input.This might be caused by application such as screensaver, however it could also mean that someone may be eavesdropping on your session.Either close the application which grabs the keyboard or log out and log in again to prevent this from happening
---
After input password 4 times, will connect console successfully. Cannot get the error msg like attachment.

Also test with virt-manager-1.1.0-1.el7.noarch, just input password 4 times, don't get any error msg, can connect the console successfully.

Hi, Udayendu:
You cannot connect the console everytime?
As my result, I can connect the console, could help me to check my steps are right?

Comment 10 CongDong 2014-09-18 07:59:21 UTC
Hi, gscrivan
could you provide some suggestions for my test in comment 9.

Comment 11 Giuseppe Scrivano 2014-09-18 10:43:48 UTC
I have tried several times here to connect trough ssh to another host but I couldn't reproduce the problem with virt-manager-1.1.0-1.el7.noarch.  I didn't need to type my password 4 times to get it connected.

Do you need to repeat it 4 times even if you type correctly your password the first time?

Comment 12 CongDong 2014-09-18 11:25:00 UTC
(In reply to Giuseppe Scrivano from comment #11)
> I have tried several times here to connect trough ssh to another host but I
> couldn't reproduce the problem with virt-manager-1.1.0-1.el7.noarch.  I
> didn't need to type my password 4 times to get it connected.
> 
> Do you need to repeat it 4 times even if you type correctly your password
> the first time?

It happens when I try to open a spice guest on remote host.

Comment 13 Giuseppe Scrivano 2014-09-18 14:32:52 UTC
it is not a bug, spice needs more ssh connections.  The solution is to setup properly a ssh key for the ssh connection to the server.

Comment 14 CongDong 2014-09-19 09:14:15 UTC
(In reply to Giuseppe Scrivano from comment #13)
> it is not a bug, spice needs more ssh connections.  The solution is to setup
> properly a ssh key for the ssh connection to the server.

Yes, I know it. But I think the problem in the description is that after input password several times, but cannot connect the guest.
I use the same version with description, but I can connect the guest after input password.

So I'm not sure my test steps are right.

Comment 15 Giuseppe Scrivano 2014-09-19 15:05:19 UTC
I could reproduce the problem after setting a higher latency on the connection (as CongDong suggested privately to me) and from a first sight, it looks like a race condition while opening more ssh tunnels.  I will investigate better next week, for now I reassign it to me.

Comment 16 Giuseppe Scrivano 2014-09-22 12:28:18 UTC
I've looked more into this issue and the root cause doesn't seem easy to fix as this ssh-askpass error message can be raised any time a window is trying to get the focus, not only from virt-manager.

It is highly suggested to use a password-less[1] login (really, nobody should want to type the same password so many times) or to setup a shared ssh connection[2].

1)

ssh-keygen
ssh-copy-id user@host

2)

Add something like the following:

Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p

to the ~/.ssh/config file.  Please refer to "man 5 ssh_config" for more details.

(other details here: https://bugzilla.redhat.com/show_bug.cgi?id=811346)

Given the above, I am going to close this as WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.