Categories
Linux shell script

script to convert openssh keys to tectia and tectia to openssh


#!/bin/bash
# Arun N S
menu="
Make your choice:
1. Openssh key to Tectia format
2. Tectia key to Openssh format
3. Exit"
while :
do
printf "%s\n: " "$menu"
read choice
case $choice in
"1") echo "Converting Openssh key to Tectia format"
echo "Enter key Path(full path):"
while read INPUT
do
ssh-keygen -e -f ${INPUT} > ${INPUT}.tectia
echo "OpenSSH format key is saved as: ${INPUT}.tectia"
exit 0
done
break;;
"2") echo "Converting Tectia key to Openssh format";
echo "Enter File Path(full path):"
while read INPUT
do
ssh-keygen -i -f ${INPUT} > ${INPUT}.openssh
echo "OpenSSH format key is saved as: ${INPUT}.openssh"
exit 0
done
break;;
"3") echo "3. Exit"
echo " Good Bye"
break;;
*) echo "Wrong Choice"
;;
esac
done

./arun

Leave a Reply

Your email address will not be published.

*