Bug 1532449

Summary: virt manager won't find ssh keys that do not follow the default naming convention.
Product: [Community] Virtualization Tools Reporter: David <dkahn222>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: berrange, crobinso, dkahn222, gscrivan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-06 19:46:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David 2018-01-09 01:20:47 UTC
Description of problem:

virt manager won't find ssh keys that do not follow a standard naming convention. For example, virt-manager will not find a ssh key named 'id_ed25519-work'. It will only find keys using the default naming convention. `id_ed25519` will work fine. 

This causes problems in environments which utilize key naming conventions which are not the default. 

Version-Release number of selected component:

Version is 1.4.3


How reproducible:

Tested across rsa keys and ed25519 keys multiple times.

Steps to Reproduce:
1. Generate a ssh key naming it something other than the default.
2. Add that new keys public key to authorized_hosts on the remote machine.
3. Verify that the key works by connecting specifying the key file on connection.
4. Attempt to connect to the remote server using virtu-manager. It will ask for passphrases from standard named keys, missing the non standard named keys.



Actual results: 

Virt manager will fail to connect to the remote host.


Expected results:

virt manager should connect to the remote host using the non standard named ssh key.

Additional info:

This could be solved a few ways.

1) Attempt to use keys in your ssh agent allowing users to add the key to their agent.

2) prompt the user for which key they want to use to connect.

Comment 1 Cole Robinson 2018-10-08 12:48:25 UTC
Sorry for the late reply.

virt-manager is not doing anything special here except launching an ssh process. If ssh by default can not see your keys. Does ssh require any special options on the command line to use/see your key?

Comment 2 David 2018-11-06 19:46:21 UTC
It was an issue on our end caused by not being loaded into the ssh agent prior to launching virt-manager.

Regards,
David