wp: The nightmare that is an IP address change at InMotion and the miracle of warp, 1password

Wow, what a crazy thing, I’m traveling a lot and then suddenly, our main site, tongfmaily.com suddenly goes down with a strange message that just lists the underlying hosting site.

I had gotten a notice that some backup files were on the site and I didn’t have a chance to delete them and I did, but things were still broken.

Finally, I’m all over trying to figure out what is going on and I finally discover that the IP address of the shared hoster had changed! I wasn’t expecting this because I’ve been using Digital Ocean for a while and two of the backup servers (richtong.com and richtong.org) are mirrored there and of course IP addresses there are stable since these are virtual private servers. I’ve been trying to get out to the cost of these things.

Inmotion Hosting Bait and Switch

They are about $18/month, so this Inmotion Hosting thing is about $12/month which really isn’t that different, but they do more management for you. You don’t get SSH access for instance and you don’t have to manage Ubuntu, but they will move stuff around like this.

The initial rate is $3/month so it is a great deal, but there is no way to get a good renewal and some people are complaining about slow service times. I haven’t had this problem, but the other thing is that they offer way more SSD so that is good if you have images and things, although I think you should use Cloudinary for this (although I’m still having trouble getting Cloudinary to work right on InMotion Hosting).

The miracle that is Warp

Seb told me about this AI integrated into the command line and I have to say it is pretty great. For instance, you can just ask it, “what are the my digital ocean droplet names” and it will automatically drop into planning mode and figure out the cli interface to do this. That is pretty great. You can really feel the world changing.

You can even say Please change the names of my droplets and it will figure out the incantations.

It isn’t perfect, however, when I tried to SSH into my Digital Ocean droplets, it started to hash all over my .ssh config, but some very convenient commands I’ve learned are here (but there is a real possibility that in 12 months, no one will ever need to learn these things, just the prompts and the explanations are great.

# warp prompt: check ssl certificate for tongfamily.com
openssl s_client -connect tongfamily.com:443 -servername tongfamily.com
# warp prompt: find command to clear the DNS cache
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder
# prompt: what are my digital ocean droplets
doctl compute droplet list --format ID,Name,PublicIPv4,Status
# prompt: change the name of by digital ocean droplet
doctl compute droplet-action rename 4359417704 --droplet-name "funny new name"

The new convenience of 1Password ssh agent

They have finally worked on fixing this, but basically I move to an ssh agent that is hosted by 1Password, but most sites limit you to just six ssh attempts to prevent bot attacks. But they’ve added a feature where there is now a separate 1Password > Developer entry and you can SSH there. The main trick is to add a URL to each of your SSH keys in 1Password in the form of “ssh://username@domain.com” and this makes it smart.

Since I still like to use the command line, I tried automated trick where it says it downloads this config to your ssh config, but this doesn’t work.

Instead the trick is that you can now download the public keys only to your .ssh/config and then you can set a config entry that only figures out the right identity with an incantation like:

host richtong.org richtong.com
  Identity "~/.ssh/the public key from 1password.pub"
  IdentitiesOnly

When you are fixing DNS how to clear caches

The last trick is that there are so many caches now, so if you have these problems and want to change say domain names, then you need to reset the Mac cache and also the browser cache to make this happen

Automated blogging entries

OK now that this is mostly fixed. That is brave still doesn’t like the certificate for tongfamliy.com but it is fine on Safari, I’m off to do more automated programming, here is the most amazing thing about Warp, you can ask it to generate a blog entry like this for you:

# Write a blog entry about all these new comamnds I learned today annotate with urls for each command

Leave a Reply

Only people in my network can comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect

Recent posts

  1. Loading Mastodon feed…