SSH server by default listens to port 22 and you don't have to manually specify the port number on your SSH client if you're connecting to the default port.
You'll have to manually specify the port number when you're connecting to non-standard SSH ports using the -p option or by adding the port information in your SSH client's configuration file.
$ nc -zv remotehost 2022 Connection to remotehost 2022 port [tcp/*] succeeded!
-v Produce more verbose output. -z Only scan for listening daemons, without sending any data to them. Cannot be used together with -l.
$ ssh [email protected] -p 2022
$ cat .ssh/config Host remotehost hostname 192.168.1.10 user remoteuser port 2022
$ ssh remotehost
Comment anonymously. Login not required.