Post

Replies

Boosts

Views

Activity

NWBrowser not working for services named _ssh._tcp
I'm using NWBrowser to connect to devices on my local network. One of the local devices broadcasts a service named "_mik._tcp." the other is "_ssh._tcp." I have no issues connecting to "_mik._tcp." but "_ssh._tcp." never connects. Is there some reason why iOS would be preventing "_ssh._tcp." connections? I have both services listed in the info.plist and have implemented the following NWParameters: let parameters = NWParameters() parameters.allowLocalEndpointReuse = true parameters.acceptLocalOnly = true parameters.allowFastOpen = true parameters.multipathServiceType = .aggregate browser = NWBrowser(for: .bonjour(type: "_ssh._tcp.", domain: "local."), using: parameters) However, with "_ssh._tcp." I never get past the "preparing" state: self.netConnect?.stateUpdateHandler = { (newState) in ... "_mik._tcp." receives both "preparing" and "ready" states almost instantly. Using the Discovery app on my Mac I can see the services listed, however _ssh.tcp has the description SSH Remote Login Protocol which I think is the root of the issue.
7
0
1.8k
Dec ’22