Tools

takeover.sh – Control Any Running Linux System Via SSH

takeover.sh - Install Linux System via SSH
Written by Martins D. Okoi

Adding to the list of script we have covered before e.g. MultiCD and Wildevine we’re here with another nifty one for the Linux gurus and it goes by the name of takeover.sh.

takeover.sh is a free and open-source script with which you can remotely take over a running Linux system using SSH. It enables you to log into an in-memory rescue environment, unmount your root filesystem, etc. all without the need to reboot your laptop.

You can also replace your running distro with another one without touching a physical console. However, you will need to reboot your system. If you are interested, you can extend takeover.sh’s features to support re-executing a new init once you’re done so that you can switch to a new distro without rebooting. Hector Martin, the developer, is accepting pull requests.

takeover.sh was created for init systems that support reloading the init binary using the telinit u command i.e. sysvinit and systemd. You would have to adapt it if you use a different system type but it still might not work.

Features of takeover.sh

  • Free and open-source.
  • Log into an in-memory rescue environment.
  • Unmount your original root filesystem.

Remember

If anything goes wrong while you’re using the takeover script your computer system will panic.

  • Do not use this script if you don’t understand exactly how it works.
  • Do not use this script on any system you care about.
  • Do not use this script on any system you expect to be up.
  • Do not run this script unless you can afford to get physical access to fix a botched takeover.
  Jumble Password – Create Unique IDs and Passwords on Linux

Hector made it clear on GitHub that takover.sh is for Linux experts and he purposely left out steps from which you can copy and past commands.

In his own words:

This script does not have any provisions for exiting out of the new environment back into something sane. You will have to reboot when you’re done. If you get anything wrong, your machine won’t boot. Tough luck. This is not a guide for newbies. I’m deliberately not giving you commands you can copy and paste. If you can’t figure out what to do exactly without handholding, this script is not for you.

I haven’t included the usage details here because most readers wouldn’t need it. But if you are interested in using the script you can see the developer’s usage guide here.

You should try the script in a VM (Virtual Machine) where you can run a tarball of your live root filesystem for testing. Hector Martin wants setting up the boot loader to be an exercise for you.

What are your thoughts on takeover.sh? Will you be taking over any systems anytime soon? Is the script even useful to you in the first place? Share your ideas in the comments section below.

Your Unwavering Support Matters a Lot:

The cost of maintenance is skyrocketing as more readers are coming on board and the ad service that we employ in order to generate revenue is unfortunately no longer sufficient and this is especially due to the increased use of ad-blockers.

We humbly request that you consider disabling your ad-blockers to support us financially or by donating as anything from $1. Your donation(s) will go a long way in supporting FossMint and sister site, TecMint, in running efficiently. Thank you.

Make a Contribution via PayPal


Top Deals

About the author

Martins D. Okoi

Martins Divine Okoi is a graduate of Computer Science with a passion for Linux and the Open Source community. He works as a Graphic Designer, Web Developer, and programmer.