Question
Ubuntu - Host Entry for private IP
Is it possible to create a host entry on my Ubuntu VPS to reference another droplet but using the private IP address?
Here’s what I’ve got:
1) web1 @ private IP #1
2) mysql1 @ private IP #2
I’ve blocked all the connections on mysql1 so that only web1 can access it via SSH (port 22) and mysql (port 3306).
I’d like to create a host entry so that when I’m on web1, I can just type “ssh username@mysql1” and not have to remember the private IP address.
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.
×