If you try to start SSH daemon on your LPAR by command
STRTCPSVR SERVER(*SSHD)
Then you see "SSHD server starting." but you still cannot connect to port 22.
You should check if job is running
WRKTCPSTS OPTION(*CNN)
Work with IPv4 Connection Status
System: IBM
Type options, press Enter.
3=Enable debug 4=End 5=Display details 6=Disable debug
8=Display jobs
Remote Remote Local
Opt Address Port Port Idle Time State
* * ftp-con > 153:32:17 Listen
* * ssh 000:07:56 Listen
* * smtp 153:32:16 Listen
If ssh is not showed and your sshd configuration file is correct then one of possibility is that this job cannot be started due to exceeding MAXJOBS value in QUSRWRK subsystem
WRKSBS
Then list down to QUSRWRK
Work with Subsystems
System: IBM
Type options, press Enter.
4=End subsystem 5=Display subsystem description
8=Work with subsystem jobs
Total Subsystem Active
Opt Subsystem Storage (M) Number Jobs Status
QSYSWRK .00 564673 179 ACTIVE
QUSRWRK .00 564789 600 ACTIVE
5=Display subsystem description
1. Operational attributes
Display Operational Attributes
System: IBM
Subsystem description: QUSRWRK Status: ACTIVE
Subsystem description . . . . . . . . : QUSRWRK
Library . . . . . . . . . . . . . . : QSYS
Maximum jobs in subsystem . . . . . . : 600
Sign-on display file . . . . . . . . . : QDSIGNON
Library . . . . . . . . . . . . . . : QSYS
System library list entry . . . . . . : *NONE
Auxiliary storage pool group . . . . . : *NONE
Workload group . . . . . . . . . . . . : *NONE
In this case Maximum jobs in subsystem is equal Active jobs.
Solution is to end some jobs in QUSRWRK subsystem and try to start *SSHD server again.
In QSYSOPR messages you can also see that something is not right.
Work with Messages
System: IBM
Messages in: QSYSOPR
Type options below, then press Enter.
4=Remove 5=Display details and reply
Opt Message
Not all requested prestart jobs started.
Not all requested prestart jobs started.
Not all requested prestart jobs started.
Message ID . . . . . . : CPI0977 Severity . . . . . . . : 30
Message type . . . . . : Information
Date sent . . . . . . : 07/11/23 Time sent . . . . . . : 12:30:53
Message . . . . : Not all requested prestart jobs started.
Cause . . . . . : 0 prestart jobs for program QZDASOINIT in library QSYS in
subsystem QUSRWRK have started. This is less than the number requested. Not
all the prestart jobs requested were started because the maximum number of
jobs was reached either for the prestart job entry or for the subsystem.