Feature Request: Make ssh-keygen -R accepts Host aliases from .ssh/config

Perry Gagne prk4man at gmail.com
Wed Oct 19 01:06:02 AEDT 2016


Hello,

This is my first feature request, so I am a little unfamilar with OpenSSH
dev.  I have used OpenSSH for a number of years, and am familar with a few
of its advanced features.

I make pretty good use of the ssh_config (normally ~/.ssh/config) file for
a few different reasons. This allows me to create entries like this:

Host myvm
Hostname vm-5.testlab.example.com
User root
ForwardX11Trusted yes


Now "myvm" is an alias to vm-5.testlab.example.com and tells SSH to login
with root (and what ever other options you specify). So instead of having
to type:

ssh -Y root at vm-5.testlab.example.com


I can just type:

ssh myvm.


This alias works with other tools like scp,sftp,etc.

One annoying thing I found when working with hosts that get reinstalled
regularly is I occasionally want to delete there known_host entires. I have
been using ssh-keygen -R to do this. However, the -R does not accept this
config file aliases. So I can just type:

ssh-keygen -R myvm

I have to type:

ssh-keygen -R  vm-5.testlab.example.com


Is there a technical reason for this? Is there a reason ssh-keygen can't do
a lookup in the config file for host alias to get the full hostname?

I wanted to send this email, before filling a feature request to get some
feedback.

Thanks,
--Perry


More information about the openssh-unix-dev mailing list