Advertisement
Guest User

Untitled

a guest
May 27th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Execute:
  4. #
  5.  
  6. show_info() {
  7. echo -e "\033[1;34m$@\033[0m"
  8. }
  9.  
  10. show_success() {
  11. echo -e "\033[1;32m$@\033[0m"
  12. }
  13.  
  14. show_error() {
  15. echo -e "\033[1;31m$@\033[m" 1>&2
  16. }
  17.  
  18. clear
  19.  
  20. echo "
  21. |------------------------------------------------------------------
  22. | RESETANDO CONFIGURAÇÕES DO SERVIDOR SSH
  23. |------------------------------------------------------------------"
  24.  
  25. show_info "Removendo configurações antigas do servidor ssh..." && \
  26. sudo apt-get purge -qq -y openssh-server > /dev/null && \
  27. show_success "Ok"
  28.  
  29. show_info "Reinstalando pacote openssh-server..." && \
  30. sudo apt-get install -qq -y openssh-server > /dev/null && \
  31. show_success "Ok"
  32.  
  33. show_info "Liberando porta 22 (SSH) no Firewall UFW..."
  34. sudo ufw allow ssh && \
  35. show_success "Ok" &&
  36. echo "------------------------------------------------------------"
  37. show_success "SERVIDOR SSH REINSTALADO COM SUCESSO."
  38. echo "------------------------------------------------------------"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement