⬇ Importing from CSV ⬇ Importing from CSV

⬇ Importing from CSV

Dmitry Machulo Dmitry Machulo

Termius doesn’t allow importing data from a CSV file per se, but you can convert it to an ssh config file (as described below) and then import it as ssh config.

To convert a CSV file, you need to ensure it's correctly formatted.

A CSV file must accord with the following format:

  • It is a plain text file named source.txt
  • Each new line represents a new entry.
  • The file follows this pattern, and blank fields are ignored: {Name},{Address},{Username}

source.txt example:

Raspberry pi,,pi
Home media center,

Convert CSV to SSH Config

Use the following command to convert your CSV file to ssh config:

awk -F',' \
'{print "Host " $1 "\n\tHostname " $2; if ($3) { print "\tUser " $3 } }' \
< source.txt > ssh_config

Example of ssh_config

Host Router
User admin
Host Raspberry pi
User pi
Host Home media center
Host Work

If you’re having any difficulties importing data, please, contact us 👨🏼‍🔧

Add comment

Please sign in to leave a comment.