Reputation: 25535
I have an SSH app on my iPhone (this one) from which I can ssh into a server and issue shell commands. There is also an app called Fing which can discover devices connected to your network (not just the DNS-SD ones, all of them). My guess is that this is done by issueing traceroute
and telnet
requests to your router's IP (192.168.0.1) and with subsequent requests to other IP's discovered.
My question is, how do you issue a shell command to an IP address programmatically with iOS?
Upvotes: 1
Views: 639
Reputation: 4093
You can an ssh library (you'll obviously need ssh details for the server) such as libssh2 or one of its ObjC wrappers such as NMSSH.
Upvotes: 1
Reputation: 9893
Have a look at tcptraceroute project. It is the implementation of traceroute
using TCP
packets.
You have to integrate it with your iOS project. I suppose it wont be a problem as its C
based.
Also it doesn't require to work with raw sockets as traceroute
tool does. For using raw sockets in iOS you have to have a root permissions, so in this case tcptraceroute
might be a solution for you.
Good luck
Upvotes: 0