Created
August 9, 2017 19:54
-
-
Save khast3x/65c8dd83575a4565b5fe554aff1330a0 to your computer and use it in GitHub Desktop.
[Kali VM] start gui or not on boot. Can also set ssh on startup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| echo "== START OR STOP GUI FOR KALI VM ==" | |
| echo "" | |
| echo "ssh $USER@$HOSTNAME" | |
| echo "" | |
| echo "" | |
| if [[ $1 = "start" ]]; | |
| then systemctl set-default graphical.target;echo "Starting GUI at reboot" | |
| elif [[ $1 = "stop" ]]; | |
| then systemctl set-default multi-user.target;echo "Stopping GUI at reboot" | |
| elif [[ $1 = "ssh" ]]; | |
| then echo "Adding SSH on boot -- AUTHORIZED KEY REQUIRED";systemctl enable ssh | |
| else | |
| echo "Choose $0 [start|stop|ssh]" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment