Configuration of a cloned Debian/Ubuntu/Windows server
Once the cloning of your Cloud server is done, you can use the newly deployed machine to test your website, or have a pre-production environment. To start operating with your clone, you will have to provision your server with a series of previous modifications.
Preparing the environment
Access the dashboard of the cloned machine and click on the icon corresponding to the SSH console.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_01.png)
Login to the cloned machine with the root user and the password of the original machine (note the special characters in the ASCII code).
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_02.png)
Once you have logged into the cloned server, you must modify the /etc/network/interfaces
file, for example with the nano editor, and modify the existing public IP in the file by the new public IP of the cloned machine, which you will have received by mail.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_03.png)
nano interfaces
Interfaces file with the initial configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_05.png)
Mail with the access credentials.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_06.png)
Updated interfaces file.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_07.png)
Then run the command /etc/init.d/networking restart
.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_08.png)
You can check the modification of the newly configured IP by executing the ifconfig -a
command.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_09.png)
At this point, your cloned machine will have its own IP and will be able to make use of any SSH connection instead of the console provided by the SWPanel.
Modifying the hosts and hostname files
Connect via SSH to the new server and modify the /etc/hosts
and /etc/hostname
files, changing the name of the original server to the name of the server you received by e-mail.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_10.png)
nano /etc/hosts
Hosts file with the initial configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_11.png)
Hosts file with the final configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_12.png)
nano /etc/hostname
Hostname file with the initial configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_13.png)
Hostname file with the final configuration.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_14.png)
Modify root user password
Run the command passwd root
so that you can change the root user password to the one you received by e-mail.
![enter image description here](https://static.swpanel.com/doc/2022/images/0265/0265_15.png)
In this way, the new cloned machine will have the same IP, with its corresponding root name and password, finalizing the cloning process and starting up the cloned server.
IMPORTANT: to save the changes with the nano editor, remember to press the control + x
keys on your keyboard.