Bug 2544

Summary: Port names are not supported!
Product: Portable OpenSSH Reporter: Jan Gyselinck <bbubje>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: trivial CC: djm
Priority: P5    
Version: 6.9p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 2893    

Description Jan Gyselinck 2016-02-26 21:14:57 AEDT
None of these options support port names (coming from f.e. /etc/services):
-D
-p
-L
-R
...

-L and -R should also support fetching port names from the remote '/etc/services'.

Right now, there's some syntax checking code that only accepts numeric values for a port. I expect this to still be an issue with the latest OpenSSH release (but I have not verified this).
Comment 1 Damien Miller 2018-10-10 15:56:43 AEDT
This should be fixed in OpenSSH 7.9

commit 2581333d564d8697837729b3d07d45738eaf5a54
Author: naddy@openbsd.org <naddy@openbsd.org>
Date:   Fri Oct 5 14:26:09 2018 +0000

    upstream: Support using service names for port numbers.
    
    * Try to resolve a port specification with getservbyname(3) if a
     numeric conversion fails.
    * Make the "Port" option in ssh_config handle its argument as a
     port rather than a plain integer.
    
    ok dtucker@ deraadt@
    
    OpenBSD-Commit-ID: e7f03633133205ab3dfbc67f9df7475fabae660d
Comment 2 Damien Miller 2018-10-19 17:17:20 AEDT
Close RESOLVED bugs with the release of openssh-8.0