Import servers from a CSV file into Ezeelogin
How to import servers from a file into the Ezeelogin SSH gateway?
Overview: This article describes how to efficiently import servers from a CSV file into the Ezeelogin SSH gateway, which also covers mandatory fields, validation steps, and handling of success and error messages.
To import servers from a CSV file into the Ezeelogin SSH gateway, follow these steps:
Step 1: To import a list of servers from a CSV file, navigate to Servers -> Import and choose the CSV file and click upload.
Step 2: Once you click upload, the CSV file will be parsed and if the format is correct, then the import button will show up so that you can import the list of servers. Using this feature you can import multiple servers quickly.
Step 3: After the successful import of the servers, it will display the message "Servers imported" as shown in the screenshot below.
Common Errors while importing servers:
1. If the server already exists, it will display the error message "No valid new servers to import" (The server exists) as shown in the screenshot below.
2. If the server group does not exist, it will display the error message "No valid new servers to import" (No such server group) as shown in the screenshot below.
3. If the field separator or text enclosure is wrong, it will display the error message "Error: Invalid header in CSV" as shown in the screenshot below.
3.a. How to identify the 'Field Separator' (delimiter) and 'Text Enclosure' used in the file being imported?
Open the file in Excel or notepad, and the delimiter will be shown as in the screenshots below.
Example of CSV file:
The first line would be the header and the second line would be the server that has to be imported. User can also use the export feature to get a CSV file as shown below which can be later used as a template to import more servers.
"name"|"ip_address"|"group"|"password"|"ssh_port"|"ssh_user"|"keep_password"|"enable_ssh"|"controlpanel"|"datacenter"|"description"|"tunnel_host"|"switch_user"|"switch_pass"|"switch_sudo"|"prompt1"|"prompt2"|"prompt3"|"cp_user"|"cp_pass"|"rc_host"|"rc_user"|"rc_pass"|"onhost"|"ishn"|"rack_id"|"machine_id"|"comments"|"use_dns"|"passphrase"|"ssh_key"|"rdp"|"windows_domain"|"ipmi_host"|"ipmi_protocol"|"ipmi_port"|"ipmi_request_method"|"ipmi_user_field"|"ipmi_username"|"ipmi_passwd_field"|"ipmi_password"|"ipmi_basic_auth"|"ipmi_request_uri"|"ipmi_extra_vars"|"ipmi_enable"
"ez.noc.com"|"118.7.63.62"|"LINUX"|""|"22"|"root"|"S"|"Y"|""|""|"TestMachine"|""|""|""|"N"|""|"Password:"|""|""|""|""|""|""|""|"N"|""|""|""|"N"|""|""|"N"|""|""|"https"|"80"|"POST"|""|""|""|""|"N"|""|""|"N"
What are the mandatory fields required to import the servers from a CSV file?
Below are the mandatory fields in the CSV file that are required to import servers:
+------------------------------------------------------------------------------------------------+
| name | ip_address | group | password | ssh_port | ssh_user | keep_password | enable_ssh |
+------------------------------------------------------------------------------------------------+
| ez.noc.com | 118.7.63.62 | Linux | | 22 | | S | Y |
+------------------------------------------------------------------------------------------------+
name | FQDN or name of the server |
ip_address | Remote server IP |
group | Server group that exists in Ezeelogin |
password | The password of the remote SSH user (leaving blank will be asked for prompt) |
ssh_port | SSH port of the remote server |
ssh_user | The username of the remote SSH user (leaving blank will be asked for prompt) |
keep_password |
Set password management for the server (leaving blank will set it to automatic) Y (keep given password), N (automatic), S (keep server password) |
enable_ssh | Enable SSH access for the remote server (leaving blank will set enable_ssh to no) |
Related Articles:
Add/update/delete servers through Ezeelogin API.