forked from fullstory/sshstart https://github.com/fullstory/sshstart
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sshdeactivate 932B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. # sshdeactivate - Stops and disable SSHD
  3. # Copyright 2017 Alf Gaida <agaida@siduction.org>
  4. # This program is free software; you can redistribute it and/or
  5. # modify it under the terms of the GNU General Public License
  6. # as published by the Free Software Foundation; version 2 of the
  7. # License.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. # rm -f /etc/ssh/ssh_host_rsa_key \
  14. # rm -f /etc/ssh/ssh_host_rsa_key.pub
  15. # rm -f /etc/ssh/ssh_host_dsa_key \
  16. # rm -f /etc/ssh/ssh_host_ecdsa_key \
  17. # rm -f /etc/ssh/ssh_host_ecdsa_key.pub
  18. # rm -f /etc/ssh/ssh_host_ed25519_key \
  19. # rm -f /etc/ssh/ssh_host_ed25519_key.pub
  20. systemctl disable ssh
  21. systemctl stop ssh
  22. echo ""
  23. echo -n "Finished. Press Enter to exit."
  24. read DUMMY
  25. exit 0