3
I've been looking for best practice for this scenario for a long time.
If I have process2 that depends on process1 running beforehand. I set up an alias like:
alias both='process1 & process2'
Then, when process2 exits, I would like for process1 to exit as well (my current solution is to go back to the terminal and kill %%
).
For example (to connect to an iOS device from mac over usb):
alias usbssh='/usr/local/bin/iproxy 2222 22 & ssh -p 2222 root@localhost'
How do I keep iproxy
running, and kill it as soon as ssh
exits?
Just seperately, do you have more info, re: Connecting to iOS over USB, via SSH? – voices – 2017-06-21T11:29:18.213
@tjt263 - obviously only works for jailbroken devices... – Elist – 2017-06-21T11:44:36.680
@tjt263, I really don't get what you are asking me. Can you please say explicitly what info you are after? – Elist – 2017-06-21T20:54:07.793
Don't think I can make it much simpler than that.. I've never heard of
iproxy
orssh
over USB and I'm just curious. I don't even really know enough about it to be more specific. – voices – 2017-06-21T21:08:10.980Ok.
iproxy
is a utility to port forward local port to a port on an apple mobile device connected via usb. It is a part of the open sourcelibimobiledevice
project. In the exaple above,localhost:2222
is forwarded to port 22 on the connected iphone. The iPhone has anssh
daemon listening on port 22. Anything else you want me to expand on? – Elist – 2017-06-22T04:42:57.533See https://github.com/libimobiledevice/libusbmuxd/blob/master/tools/iproxy.c and http://iphonedevwiki.net/index.php/SSH_Over_USB.
– Elist – 2017-06-22T07:19:57.403