⬇ 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:

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

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
Hostname 192.168.1.1
User admin
Host Raspberry pi
Hostname 192.168.1.15
User pi
Host Home media center
Hostname 192.168.1.16
Host Work
Hostname 81.138.33.19

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

Add comment

Please sign in to leave a comment.