I have a WiFi-to-Ethernet bridge on my raspberry pi 4B that works great, but I’d like to be able to SSH into the unit when no network is detected. Is there a way to configure hostapd just so I can SSH? Whenever I setup a hotspot it works, but then messes up my Ethernet bridge. I only need the hotspot for ssh, internet connectivity is not required

  • 1
    You can not configure hostapd that way. However, you can use iptables to block traffic. You need to allow RELATED,ESTABLISHED traffic but after that you can block all the ports but 22 and possible 67/68 for DHCP client.
    – cybernard
    Commented Aug 4, 2023 at 14:39

1 Answer 1


So I had a similar issue where I wanted to make sure I could control the Raspberry Pi via my hotspot if like something goes wrong with it. As far as I know, the Raspberry Pi should have its own IP address under the hotspot. It is normally the gateway or something. You should just be able to connect to the IP address just like that.

Another option that I did, I set up Cockpit or another service that can do SSH via the web. Doesn't need the internet, and you can do it via the web. You just connect to the hotspot and go to the IP and port of the Raspberry Pi and cockpit.

I hope that helps.

  • Thank you so much! I’ll try cockpit
    – cdubs
    Commented Aug 30, 2023 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.