sudo sed -i "/.*${VM_NAME}.*/d" /etc/hosts
sudo bash -c "echo '${_ip} ${VM_NAME}' >> /etc/hosts"
+# remove ssh xci-vm-config that uses none-distro specific filename
+/bin/rm -f $HOME/.ssh/xci-vm-config
+
echo "Dropping a minimal .ssh/config file"
-cat > $HOME/.ssh/xci-vm-config<<EOF
+cat > $HOME/.ssh/${OS}-xci-vm-config<<EOF
Host *
StrictHostKeyChecking no
ServerAliveInterval 60
ServerAliveCountMax 5
IdentityFile ${BASE_PATH}/xci/scripts/vm/id_rsa_for_dib
-Host *_xci_vm
+Host ${OS}_xci_vm
User devuser
-Host *_xci_vm_opnfv
+Host ${OS}_xci_vm_opnfv
Hostname 192.168.122.2
User root
TCPKeepAlive yes
EOF
# Final ssh command which will also test the configuration file
-declare -r vm_ssh="ssh -F $HOME/.ssh/xci-vm-config"
+declare -r vm_ssh="ssh -F $HOME/.ssh/${OS}-xci-vm-config"
echo "Preparing test environment..."
# *_xci_vm hostname is invalid. Letst just use distro name