1

I've started the hostapd deamon and am able to connect to it via Wi-Fi. Now I want to SSH from the connected device into the server that started the hostapd WiFi. The SSH deamon is running of course.

The problem is that I don't know the IP address. How can I figure this out? or configure it properly?

It seems that the server does not have an IP address for wlan0 when in AP mode.

And the connected device seems to be connected to a network with 65536 possible IP addresses. Can I limit this to 256 IP addresses?

Is this even something to be configured via hostapd? Or do I need to configure another service for that?

Note that I do not share an internet connection for the connected devices. I just want them to be able to SSH into the server via its own Wi-Fi.

3
  • Im not sure you can determine the IP address using the information you have provided - AFAIK hostapd works below the IP level. If you know the make of computer, maybe you can do a portscan and use mac address lookups to narrow down the list of pissible IP's?
    – davidgo
    Commented Sep 9, 2022 at 6:01
  • 2
    FWIW, "And the connected device seems to be connected to a network with 65536 possible IP addresses.": if the network is 169.254.0.0/16 that means the device attempted DHCP and it failed, so it chose an IPv4LL address as fallback.
    – A.B
    Commented Sep 9, 2022 at 12:56
  • The missing DHCP server was the important hint. Now it works, I can connect via SSH. To put sugar on top, can I make the server available for its hostname.local? Or do I need a DNS server for that? Commented Sep 9, 2022 at 15:46

1 Answer 1

2

You have to assign wlan0 an ip address first. Then bring it up. Like. sudo ip addr add 10.0.0.5/24 dev wlan0 or whatever your ip is, then sudo ip link set dev wlan0 up. Then if you have hostapd running and conf right you should be able to ssh.

1
  • Tried that. But I still cannot connect to 10.0.0.5 via SSH. Commented Sep 9, 2022 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .