Last active
July 31, 2021 15:51
-
-
Save LBeckX/548f4f42c5f63d93c75452658a2e1d28 to your computer and use it in GitHub Desktop.
VirtualBox Clone Ubuntu20
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/sh | |
apt update | |
apt upgrade | |
apt install net-tools | |
apt install network-manager | |
######################## | |
# Change hostname | |
######################## | |
# hostnamectl set-hostname 'hostname' | |
# vi /etc/hosts # And change the hostname | |
######################## | |
# Reset network // Think of to give new MAC-Address | |
# And always use nat-network btw. enable port-forwarding from 127.0.0.1:PORTX to VM_IP:ExecutionPort | |
# Example SSH: Host IP: 127.0.0.1, Host Port: 2201, VM IP: 10.2.0.15, VM Port: 22 | |
# Uncomment to reset VM ID | |
######################## | |
#rm -rf /etc/machine-id | |
#dbus-uuidgen --ensure=/etc/machine-id | |
#init 6 | |
######################## | |
# Init ssh key | |
######################## | |
# ssh-keygen | |
######################## | |
# Copy ssh-key to cluster machine | |
######################## | |
# ssh-copy-id -i ~/.ssh/id_rsa_XXX USER@IP | |
######################## | |
# Disable ssh rootlogin | |
# Move to file /etc/ssh/sshd_config | |
# Set PermitRootLogin no | |
######################## | |
######################### | |
# Allow SSH only for group | |
######################### | |
# sudo groupadd sshusers | |
# sudo usermod -a -G sshusers USER | |
# sudo echo "AllowGroups sshusers" >> /etc/ssh/sshd_config | |
########################################################## | |
# More information about to make linux secure https://github.com/imthenachoman/How-To-Secure-A-Linux-Server#installing-linux | |
########################################################## |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment