Apple - Can I SSH into my Mac from an iPhone over Wi-Fi LAN with no connection to the internet?

Yes. You can. However the Apple Mac OS X operating system has SSH installed by default but the SSH daemon is not enabled. This means you can’t login remotely or do remote copies until you enable it.

To enable it, go to ‘System Preferences’. Under ‘Internet & Networking’ there is a ‘Sharing’ icon. Run that. In the list that appears, check the ‘Remote Login’ option.

This starts the SSH daemon immediately and you can remotely login using your username. The ‘Sharing’ window shows at the bottom the name and IP address to use. You can also find this out using ‘whoami’ and ‘ifconfig’ from the Terminal application.

An app called iTerminal - SSH Telnet Client is available free on the App Store. It allows you to connect via SSH to your Mac iTerminal.

Another app called Reflection for UNIX - SSH Client will also do this for free.

To run the server without Internet will be fine. The DCHP server will still allow access with Bonjour and manually inputting the IP address of the Mac.