Bug 3261

Summary: difficulty looking up default SSH port in documentation
Product: Portable OpenSSH Reporter: frederik-openssh
Component: DocumentationAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED WORKSFORME    
Severity: enhancement CC: djm
Priority: P5    
Version: 8.4p1   
Hardware: Other   
OS: Linux   

Description frederik-openssh 2021-02-12 10:09:52 AEDT
Just found it a bit strange that the default SSH port is not in the main manual page:

    $ cat /etc/services| grep -w '^ssh'
    ssh                22/tcp
    ssh                22/udp
    ssh                22/sctp
    ssh-mgmt        17235/tcp
    ssh-mgmt        17235/udp
    $ man ssh |grep -w port | wc -l
    44
    $ man ssh | grep 22
    [1]$ man ssh | grep etc/services
    [1]$ man ssh_config |grep -w 22
             fault is 22.

What is the expected manner in which a new user learns this information?

It is so basic that I would have put it in the second paragraph of the manual page.
Comment 1 Damien Miller 2022-01-14 15:33:54 AEDT
It's in the sshd manual page, since it is the thing that listens:

> -p port
>       Specifies the port on which the server listens for connections
>       (default 22).  Multiple port options are permitted.  Ports

ssh strictly uses what is in /etc/services
Comment 2 Damien Miller 2022-02-25 13:59:09 AEDT
closing bugs resolved before openssh-8.9
Comment 3 frederik-openssh 2022-02-25 15:23:40 AEDT
> ssh strictly uses what is in /etc/services

$ man ssh | grep etc/services
[1]$