MysticRyuujin / guac-install

Script for installing Guacamole on Ubuntu
987 stars 272 forks source link

Suggested fix for Ubuntu 22.04 rsa ssh support (with a scripted prompt) #232

Open itiligent opened 1 year ago

itiligent commented 1 year ago

Suggestion:

I add this to many of my build scripts... It might be handy to include this scripted prompt for Ubuntu users. (For some reason formatted code wont paste properly in full)

source /etc/os-release if [[ $VERSION_ID > "22" && $NAME = "Ubuntu" ]] ; then

while true; do
echo 
echo -e "Ubuntu SSH public key configuration.." 
echo
echo -e "Ubuntu 22.X and above removed default support for RSA formatted SSH public keys."  
echo

 read -p 'Restore Ubuntu support for RSA SSH public keys now? yes/no: ' INPUT
 case $INPUT in
     [yY]*)
        sed -i  '$ a PubkeyAcceptedKeyTypes +ssh-rsa' /etc/ssh/sshd_config
        service ssh restart 
        echo
        break
         ;;
     [nN]*)
        echo
        echo -e "$Ubuntu SSH public key configuration not updated." 
        echo
        break
         ;;
      *)
         echo 'Invalid input' >&2
 esac

done fi