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.
SSHserver listens to is reachable from the client host.
$ 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
SSHclient configuration file for persistence.
$ cat .ssh/config Host remotehost hostname 192.168.1.10 user remoteuser port 2022
SSHclient with just the
Hostname without having to provide port number as parameter.
$ ssh remotehost
Support us on Patreon if this guide has helped you. Thanks!!!
Comment anonymously. Login not required.