Code Monkey home page Code Monkey logo

termux-reverse-ssh's Introduction

termux-reverse-ssh (trs)

Make Android phone accessible from a public server via reverse SSH tunnel. Root NOT needed.

Requirements & Function

You need a server accessible via SSH in public network, and an URL you can control to be valid or invalid.

trs will check whether a URL is accessible every 30 minutes. The URL is normally invalid and if it becomes valid, trs will be triggered and open a reverse SSH tunnel to a remote server, from which the phone's Termux SSH can be accessed aka phone can be remote controlled.

Installation

Install Termux and Termux:Boot. Launch Termux:Boot once.

Setup ssh and sshd in Termux. Then run install.sh in Termux. You'll be prompted for server and trigger URL information.

If everything works fine, trs will auto-launch on device startup.

Example usage

After your phone is stole... And if it isn't turned off...

Prepare the trigger URL

(Here it's by creating a file on an FTP/HTTP site -- a 404 URL becomes valid)

Reverse SSH tunnel will start after at most 30min

(It's a debugging picture, you won't see this, of course)

Connect to the server and access the phone, now in Termux: where there is a shell, there is a way

Photos being backed-up via scp: speed is not bad!

Others

NO WARRANTY

Read the source code for detailed usage. It's shorter than this README.

Security is not guaranteed. SSH private key is on phone.

I don't want to be "logged-in" to the server all the time, so didn't make an always-alive connection.

You shouldn't rely this on data protection. Backup regularly instead.

termux-reverse-ssh's People

Contributors

regymm avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.