Selaa lähdekoodia

Try to keep ssh clients alive

Bob Mottram 11 vuotta sitten
vanhempi
commit
ed82d1511f
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6
    3
      beaglebone.txt

+ 6
- 3
beaglebone.txt Näytä tiedosto

643
 Protocol 2
643
 Protocol 2
644
 PermitEmptyPasswords no
644
 PermitEmptyPasswords no
645
 StrictModes yes
645
 StrictModes yes
646
+TCPKeepAlive no
646
 #+END_SRC
647
 #+END_SRC
647
 
648
 
648
 Append the following:
649
 Append the following:
649
 
650
 
650
 #+BEGIN_SRC: bash
651
 #+BEGIN_SRC: bash
652
+ClientAliveInterval 60
653
+ClientAliveCountMax 3
651
 Ciphers aes256-ctr,aes192-ctr,aes128-ctr
654
 Ciphers aes256-ctr,aes192-ctr,aes128-ctr
652
 MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
655
 MACs hmac-sha2-512,hmac-sha2-256,hmac-ripemd160
653
 KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1
656
 KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1
654
 #+END_SRC
657
 #+END_SRC
655
 
658
 
656
-CTRL-X CTRL-S to save, then CTRL-X CTRL-C to exit.  Now clear out any pre-existing host keys and reconfigure the ssh server.
659
+CTRL-x CTRL-s to save, then CTRL-x CTRL-c to exit.  Now clear out any pre-existing host keys and reconfigure the ssh server.
657
 
660
 
658
 #+BEGIN_SRC: bash
661
 #+BEGIN_SRC: bash
659
 rm /etc/ssh/ssh_host_*
662
 rm /etc/ssh/ssh_host_*
4046
 #+BEGIN_SRC: bash
4049
 #+BEGIN_SRC: bash
4047
 export HOSTNAME=mydomainname.com
4050
 export HOSTNAME=mydomainname.com
4048
 cd /var/www/$HOSTNAME
4051
 cd /var/www/$HOSTNAME
4049
-mv htdocs htdocs_old
4052
+rm -rf htdocs
4050
 git clone https://github.com/friendica/red.git htdocs
4053
 git clone https://github.com/friendica/red.git htdocs
4051
 chmod -R 755 htdocs
4054
 chmod -R 755 htdocs
4052
 chown -R www-data:www-data htdocs
4055
 chown -R www-data:www-data htdocs
4067
 and append the following, changing mydomainname.com to whatever your domain is.
4070
 and append the following, changing mydomainname.com to whatever your domain is.
4068
 
4071
 
4069
 #+BEGIN_SRC
4072
 #+BEGIN_SRC
4070
-*/10 *  * * *	root	cd /var/www/mydomainname.com/htdocs; /usr/bin/php include/poller.php
4073
+12,22,32,42,52 * *   *   *   root cd /var/www/apespace.org/htdocs; /usr/bin/timeout 240 /usr/bin/php include/poller.php
4071
 #+END_SRC
4074
 #+END_SRC
4072
 
4075
 
4073
 Save and exit, then restart cron.
4076
 Save and exit, then restart cron.