Bug 2172 - ssh cann't use link-local IPv6 address in configuration file
Summary: ssh cann't use link-local IPv6 address in configuration file
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 6.2p1
Hardware: All Linux
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_7
  Show dependency treegraph
 
Reported: 2013-11-13 19:04 AEDT by Michael Tatarinov
Modified: 2014-10-08 08:00 AEDT (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 Michael Tatarinov 2013-11-13 19:04:40 AEDT
Hello

For use link-local IPv6 address need to specify the interface. It's possible in command line but impossible in configure file.

$ ssh fe80::203:47ff:fe98:7799%em1
it's ok, but
$ ssh -F .ssh/config_test test
percent_expand: unknown key %e
$ cat .ssh/config_test
host test
 HostName fe80::203:47ff:fe98:7799%em1
Comment 1 Damien Miller 2013-11-13 22:10:19 AEDT
You can include a literal '%' using '%%', so:

host test
 HostName fe80::203:47ff:fe98:7799%%em1

Does that solve your problem?
Comment 2 Michael Tatarinov 2013-11-13 23:27:46 AEDT
Yes, it's solve problem. Thanks!
Then it should be documented.
Comment 3 Damien Miller 2014-07-03 15:33:48 AEST
Done. The manual text (coming in openssh-5.7) now reads:

>     HostName
>             Specifies the real host name to log into.  This can be used to
>             specify nicknames or abbreviations for hosts.  If the hostname
>             contains the character sequence `%h', then this will be replaced
>             with the host name specified on the command line (this is useful
>             for manipulating unqualified names).  The character sequence `%%'
>             will be replaced by a single `%' character, which may be used
>             when specifying IPv6 link-local addresses.
>
>             The default is the name given on the command line.  Numeric IP
>             addresses are also permitted (both on the command line and in
>             HostName specifications).
Comment 4 Damien Miller 2014-10-08 08:00:57 AEDT
Close all bugs left open from 6.6 and 6.7 releases.