IP address problem when cloning linode

I've just cloned a linode running Ubuntu but I can't access it using ssh. The connection times out, and when I view the ssh log in real time (using the Lish console) there is no activity after ssh start-up.

I've tried rebooting the linode; I've checked the IP tables.

But then I did 'hostname -I' via Lish and it reports the same IP address as the node I cloned! I.e. not the IP address which the linode web page reports for the new clone.

How should I get the machine to use the new IP address reported on its linode web page?

Thanks

3 Replies

Since the clone is a full replica, this will include the hostname and /etc/hosts file from the original Linode. After the cloning has completed, you will want to connect using the LISH (Linode Shell) Console so that you can update your hostname and then reconfigure the IP addresses within your /etc/hosts file.

Thanks @jhartman. I did find that there was a hardwired domain name in the /etc/hosts file of the original linode, but removing that (and leaving localhost) before cloning again didn't help. The hostname reported on the original linode is "localhost".

I can't access the lish console since the machine is configured only for ssh (secret key) access.

How should I get the machine to use the new IP address reported on its linode web page?

Normally Network Helper would do this automatically for you even when cloning if you're using one of Linode's images. I was able to clone a Linode Ubuntu 20.04LTS image and once the clone booted it was network capable with its new ip automatically. I did not modify the hostname.

It sounds like maybe you're using a custom image? Have disabled Network Helper? Or have disabled/unistalled whatever Network Helper expects for your used distro.

In my case with Ubuntu 20.04 it seems Network Helper expects systemd's network management (/etc/systemd/network/05-eth0.network):

https://www.linode.com/docs/products/compute/compute-instances/guides/network-helper/

So a custom image of Ubuntu 20.04LTS would also need systemd's network management in order to be compatible with Network Helper like Linode's is it seems.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct