If you use SSH on your MacOS device, then you should know there is a built-in SSH connection manager that is easy to call up and use.
A Wi-Fi network is more than just the router, however. There will almost always be at least some devices wired to the router as well, like a modem or NAS, for example, and you'll want to use ...