usernew.sh 941 B

12345678910111213141516171819202122232425262728
  1. # !/bin/bash
  2. # Script auto create user SSH
  3. read -p "Username : " Login
  4. read -p "Password : " Pass
  5. read -p "Expired (hari): " masaaktif
  6. IP=`curl icanhazip.com`
  7. useradd -e `date -d "$masaaktif days" +"%Y-%m-%d"` -s /bin/false -M $Login
  8. exp="$(chage -l $Login | grep "Account expires" | awk -F": " '{print $2}')"
  9. echo -e "$Pass\n$Pass\n"|passwd $Login &> /dev/null
  10. echo -e ""
  11. echo -e "====Informasi SSH Account===="
  12. echo -e "Host: $IP"
  13. echo -e "Username: $Login "
  14. echo -e "Password: $Pass"
  15. echo -e "Port SSL: 443"
  16. echo -e "Port Dropbear: 80,143"
  17. echo -e "Port SSH: 22"
  18. echo -e "Port Websocket : 8880"
  19. echo -e "Port Squid: 8000,8080"
  20. echo -e "Host Squid: 55,77,236,132"
  21. echo -e "Config OpenVPN (UDP 1194): http://$IP:81/client.ovpn"
  22. echo -e "-----------------------------"
  23. echo -e "Aktif Sampai: $exp"
  24. echo -e "============================="
  25. echo -e "Payload Websocket : GET / HTTP/1.1[crlf]Host: tunnel.kalimantan-rev.my$echo -e ""
  26. echo -e ""