tpotce/installer/home/ssh_enable.sh

33 lines
842 B
Bash
Raw Normal View History

2015-01-27 16:46:52 +00:00
#!/bin/bash
########################################################
2015-12-08 14:47:39 +00:00
# T-Pot #
2015-01-27 16:46:52 +00:00
# SSH enable script #
# #
2015-12-08 14:47:39 +00:00
# v0.01 by mo, DTAG, 2015-06-15 #
2015-01-27 16:46:52 +00:00
########################################################
if ! [ -f /etc/init/ssh.override ];
then echo "### SSH is already enabled. Exiting."
exit 1;
fi
echo "### This script will enable the ssh service (default port tcp/64295)."
echo "### Password authentication is disabled by default."
2015-12-08 14:47:39 +00:00
while true
2015-01-27 16:46:52 +00:00
do
echo -n "### Do you want to continue (y/n)? "; read myANSWER;
case $myANSWER in
n)
echo "### Exiting."
exit 0;
;;
y)
break
;;
esac
done
sudo rm /etc/init/ssh.override
sudo service ssh start