Bug 2935 - improve documentation of "ssh-keygen -R" to mention "[hostname]:port"
Summary: improve documentation of "ssh-keygen -R" to mention "[hostname]:port"
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-keygen (show other bugs)
Version: 7.9p1
Hardware: Other Linux
: P5 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_8_0
  Show dependency treegraph
 
Reported: 2018-11-29 23:26 AEDT by Thomas Hofmann
Modified: 2021-04-23 14:54 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hofmann 2018-11-29 23:26:47 AEDT
Improve the documentation of ssh-keygen's -R parameter to explicitly describe how to delete the line in the "known_hosts"-file for non-standard port connections.

current: 
___
 -R hostname
             Removes all keys belonging to hostname from a known_hosts file.  This option is useful to delete hashed hosts (see the -H option above).
___

proposed:
___
 -R hostname
 -R [hostname]:port
             Removes all keys belonging to hostname and port from a known_hosts file, brackets and ":port" may be ommited if the standard port (22) is used.  This option is useful to delete hashed hosts (see the -H option above).
___

Personal remark, at least in the documentation the use of "[]" may lead to misinterpretation, therefore the explicit notion of them in the proposal. It would seem that the use of the representation as "hostname:port" is more natural.

Kind regards,
Thomas Hofmann
Comment 1 Damien Miller 2018-12-07 14:33:59 AEDT
Fixed - it now reads:

 -R hostname | [hostname]:port
      Removes all keys belonging to the specified hostname (with
      optional port number) from a known_hosts file.  This option is
      useful to delete hashed hosts (see the -H option above).
Comment 2 Damien Miller 2021-04-23 14:54:56 AEST
closing resolved bugs as of 8.6p1 release