Parcourir la source

Remove ssh references from mesh client setup

Bob Mottram il y a 8 ans
Parent
révision
06e2232482
1 fichiers modifiés avec 0 ajouts et 26 suppressions
  1. 0
    26
      src/freedombone-image-mesh

+ 0
- 26
src/freedombone-image-mesh Voir le fichier

@@ -535,26 +535,6 @@ function show_desktop_icons {
535 535
     killall mate-panel
536 536
 }
537 537
 
538
-function disable_password_logins {
539
-    if [ ! -d /home/$DEFAULT_USERNAME ]; then
540
-        echo $"Home directory for $DEFAULT_USERNAME not found"
541
-        exit 3682572
542
-    fi
543
-
544
-    # create an authorized_keys file
545
-    if [ ! -d /home/$DEFAULT_USERNAME/.ssh ]; then
546
-        mkdir -p /home/$DEFAULT_USERNAME/.ssh
547
-    fi
548
-    if [ ! -f /home/$DEFAULT_USERNAME/.ssh/authorized_keys ]; then
549
-        touch /home/$DEFAULT_USERNAME/.ssh/authorized_keys
550
-    fi
551
-    chown -R $DEFAULT_USERNAME:$DEFAULT_USERNAME /home/$DEFAULT_USERNAME/.ssh
552
-
553
-    # disable password logins
554
-    sed -i 's|#PasswordAuthentication.*|PasswordAuthentication no|g' /etc/ssh/sshd_config
555
-    sed -i 's|PasswordAuthentication.*|PasswordAuthentication no|g' /etc/ssh/sshd_config
556
-}
557
-
558 538
 function enable_batman_daemon {
559 539
     systemctl enable batman
560 540
     systemctl daemon-reload
@@ -572,10 +552,6 @@ function mesh_amnesic {
572 552
     echo "if [ -f /home/${MY_USERNAME}/.bash_history ]; then" >> /usr/bin/amnesic
573 553
     echo "    shred -zu /home/${MY_USERNAME}/.bash_history" >> /usr/bin/amnesic
574 554
     echo 'fi' >> /usr/bin/amnesic
575
-    echo "if [ -f /home/${MY_USERNAME}/.ssh/authorized_keys ]; then" >> /usr/bin/amnesic
576
-    echo "    shred -zu /home/${MY_USERNAME}/.ssh/authorized_keys" >> /usr/bin/amnesic
577
-    echo "    echo '' > /home/${MY_USERNAME}/.ssh/authorized_keys" >> /usr/bin/amnesic
578
-    echo 'fi' >> /usr/bin/amnesic
579 555
     echo "if [ -f /home/${MY_USERNAME}/.xsession-errors ]; then" >> /usr/bin/amnesic
580 556
     echo "    shred -zu /home/${MY_USERNAME}/.xsession-errors" >> /usr/bin/amnesic
581 557
     echo 'fi' >> /usr/bin/amnesic
@@ -606,7 +582,6 @@ function mesh_amnesic {
606 582
 
607 583
 function mesh_restart_daemons {
608 584
     systemctl restart avahi-daemon
609
-    systemctl restart ssh
610 585
     systemctl restart tox-bootstrapd
611 586
     if [ $ENABLE_ZERONET ]; then
612 587
         systemctl restart zeronet
@@ -803,7 +778,6 @@ if [ -f $MESH_INSTALL_SETUP ]; then
803 778
     fi
804 779
     configure_toxcore
805 780
     create_tox_user
806
-    disable_password_logins
807 781
     mesh_amnesic
808 782
 
809 783
     if [ ! -f $MESH_AMNESIC ]; then