Import from Text / CSV

Last updated last month

If you want to import multiple hosts, this script will help.

Requirements

  • A MacOS, Linux or Windows PC

  • Python and Termius CLI‚Äč

  • The importer.py script

  • A source.txt file with the hosts and details

importer.py is capable of importing hostnames, addresses, usernames, and passwords only. You may need to modify the script to import other host details.

First Things First

Before you continue, please run these commands:

termius login termius pull

If the commands return:

pull data from Termius cloud.

Please continue. Otherwise, you have encountered a bug. Please contact us for assistance.

Preparing the source.txt File

The source file is a plain text file. Each new line is considered a new entry. Values are separated by a comma ,. The source file follows the following pattern and blank fields are ignored:

{Name},{Address},{Username},{Password}

Your file could look like the following:

Router,192.168.1.1,admin,admin
Raspberry pi,192.168.1.15,pi,Raspberry
Home media center,192.168.1.16
Work,81.138.33.19

Get importer.py

Download the importer.py script. There is a gist available here.

Please make sure importer.py and the source file are in the same directory.

Run importer.py

Now importer.py and source.txt are prepared you may run importer.py.

  • Open the terminal

  • Navigate to the directory that contains importer.py and source.txt

  • Run python importer.py source.txt

The script will take a few seconds to initiate and you'll be prompted to login. You'll be asked to provide your password several times again. Note that processing may take a while, especially when you are importing a large amount of hosts.

It is wise to run a test on a smaller amount of hosts to ensure the import works correctly.