I'm thinking of creating a system which would help me transfer the output of my bash terminal to an app in a remote device(like my Android smartphone).

I was thinking of tackling this problem as just a read and write problem on two ends of a Socket with the Server running in my machine and Client in my phone. But the problem I ran into was that my devices can be on different networks. In that case, do I have to implement something like port-forwarding? Is there a better approach to this which will require minimal effort as a user who doesn't know much about networking and how to set up port-forwarding?

1 Answer 1


I definitely would not bore a hole through all the firewalls for this. You don't want an internal device exposed to the public internet. Instead, consider building a web service that other servers can send requests to in order to update the status of whatever jobs they are running. This web service can be exposed publicly so other computers or mobile devices can retrieve the status of these jobs.

This is a generic enough problem that I would investigate whether or not open source or commercial solutions exist. It is an awful lot of effort to do this securely, and lots of organizations have this problem.

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.