Last active
February 16, 2016 06:38
-
-
Save kenjij/70439b6d55a3d7a27b62 to your computer and use it in GitHub Desktop.
Create New Host from Ubuntu Backup Image
This file contains 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
# Better to be root | |
sudo bash | |
# Change IP address (static) | |
nano /etc/network/interfaces | |
# Update hostnames | |
nano /etc/hostname | |
nano /etc/hosts | |
# Generate new SSH host keys | |
rm /etc/ssh/ssh_host_* | |
dpkg-reconfigure openssh-server | |
# If dpkg-reconfigure doesn't work | |
ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key | |
ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key | |
ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment