If you are facing the snapshot restoring and No SSH problem like me, Its easy to fix.
Here is the problem. I took a snapshot of my old server and then restored it to new server. Now I can’t SSH to it, or just ping to any external site in that server (ping google.com doesn’t work). However, everything is working in the digital ocean console side.
I spent 5 long hours to find this solution. I hope to help you too!!!
Open DigitalOcean console and login to your server. (If the previous password doesn’t work, just reset/forgot password it)
ifconfig and click enter.
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:420 errors:0 dropped:0 overruns:0 frame:0 TX packets:420 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:107265 (107.2 KB) TX bytes:107265 (107.2 KB)
ens3 Link encap:Ethernet HWaddr c2:eb:73:62:d7:5d .......and so on. lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:426 errors:0 dropped:0 overruns:0 frame:0 TX packets:426 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:109321 (109.3 KB) TX bytes:109321 (109.3 KB)
ens3to the network interface. To do that, type ``` cat /etc/network/interfaces
auto lo iface lo inet loopback
5. Go to the source, which is ```/etc/network/interfaces.d/``` for me. Type ```cat /etc/network/interfaces.d``` 6. Type ```ls``` and edit the file there. For me, its ```50-cloud-init.cfg```. So, type ```nano 50-cloud-init.cfg``` 7. This is your previous server's network configuration, just change the values of ```IP Address``` and ```Gateway```. You can find these values in your Digital ocean >Droplet>Networking section. Also, add ```ens3``` device or whatever we found in step 3. Make the file similar to this,
auto lo iface lo inet loopback dns-nameservers 22.214.171.124 126.96.36.199
auto lo ens3 iface lo inet loopback
iface ens3 inet static address 68.183.xx.xxx/20 gateway 68.183.xx.x
iface ens3 inet static address 10.47.0.5/16
8. Done, It should work now. Try ```ping google.com``` & should work properly. Thank me later, Regards, Sreekant Shenoy
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!