Browse Source

Remove ssh references from mesh client setup

Bob Mottram 8 years ago
parent
commit
06e2232482
1 changed files with 0 additions and 26 deletions
  1. 0
    26
      src/freedombone-image-mesh

+ 0
- 26
src/freedombone-image-mesh View File

535
     killall mate-panel
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
 function enable_batman_daemon {
538
 function enable_batman_daemon {
559
     systemctl enable batman
539
     systemctl enable batman
560
     systemctl daemon-reload
540
     systemctl daemon-reload
572
     echo "if [ -f /home/${MY_USERNAME}/.bash_history ]; then" >> /usr/bin/amnesic
552
     echo "if [ -f /home/${MY_USERNAME}/.bash_history ]; then" >> /usr/bin/amnesic
573
     echo "    shred -zu /home/${MY_USERNAME}/.bash_history" >> /usr/bin/amnesic
553
     echo "    shred -zu /home/${MY_USERNAME}/.bash_history" >> /usr/bin/amnesic
574
     echo 'fi' >> /usr/bin/amnesic
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
     echo "if [ -f /home/${MY_USERNAME}/.xsession-errors ]; then" >> /usr/bin/amnesic
555
     echo "if [ -f /home/${MY_USERNAME}/.xsession-errors ]; then" >> /usr/bin/amnesic
580
     echo "    shred -zu /home/${MY_USERNAME}/.xsession-errors" >> /usr/bin/amnesic
556
     echo "    shred -zu /home/${MY_USERNAME}/.xsession-errors" >> /usr/bin/amnesic
581
     echo 'fi' >> /usr/bin/amnesic
557
     echo 'fi' >> /usr/bin/amnesic
606
 
582
 
607
 function mesh_restart_daemons {
583
 function mesh_restart_daemons {
608
     systemctl restart avahi-daemon
584
     systemctl restart avahi-daemon
609
-    systemctl restart ssh
610
     systemctl restart tox-bootstrapd
585
     systemctl restart tox-bootstrapd
611
     if [ $ENABLE_ZERONET ]; then
586
     if [ $ENABLE_ZERONET ]; then
612
         systemctl restart zeronet
587
         systemctl restart zeronet
803
     fi
778
     fi
804
     configure_toxcore
779
     configure_toxcore
805
     create_tox_user
780
     create_tox_user
806
-    disable_password_logins
807
     mesh_amnesic
781
     mesh_amnesic
808
 
782
 
809
     if [ ! -f $MESH_AMNESIC ]; then
783
     if [ ! -f $MESH_AMNESIC ]; then