Categories
Computing

Friendly Hostnames with SSH

This article is for Mac OS X, 10.9.5. We’ll review how to log in to a machine on AWS using a friendly hostname rather than an IP address.

If you have many servers in your care, recalling all the related IP Addresses can be tedious, confusing and error-prone. Keeping a list in a database or spreadsheet is one way to track IP Addresses, but a more efficient method is to keep that list in the hosts file on your machine. Once you set up your hostname, there won’t be anything to look up!

Instead of typing in:

ssh 192.168.10.109 -l myusername -i mypemfile

we’ll be able to type in:

ssh myservername -l myusername -i mypemfile

If you’ve adopted naming conventions, logging in is quite easy.


Four Easy Steps Overview

  1. Check to see if you have a file called /etc/hosts.
  2. If not, create a symbolic link to /private/etc/hosts.
  3. Edit the file using pico adding the desired entry.
  4. Log in to the target machine.

Four Easy Steps with Detail

  • From any directory, type ls -l /etc/hosts. If the terminal responds with “no such file or directory“, we’ll create the link to /private/etc/hosts in the next step.
  • To add the symbolic link, use the ln command with the -s option (the -s option specifies that the link is symbolic). This will create a link from /etc/hosts to the actual file /private/etc/hosts and make the hosts file generally available wherever you are in terminal.
ln -s /private/etc/hosts /etc/hosts
  • Now, edit /etc/hosts using nano, pico or your favorite text editor. Add an entry similar to what is shown below. (Note that the ip address is hidden in the example.) In this case, we’re mapping the IP to a standard machine abbreviation used to represent the company (gwa), the type of server — ws (webserver), and the number of the server.

etc_hosts_file

  • At the point, you should be able to log in to your target machine using the hostname specified in the hosts file. The first time you connect, you’ll see a message similar to the following.

friendly_hostname_login

That’s it!

Categories
Computing

Inspiration

Hustle. I’m seeing a lot of it these days, and in ways that are inspiring.

Many of the people I’m meeting up with these days are part of new businesses, or they are revitalizing and transforming existing ones. It doesn’t really matter which. They seem energized with the possibility of something better, and fatigued by the same old.

There has been a lot of “we can’t” floating around in my world. There has been a lot of “do it for me”. I’ve been listening to people complain about “getting older”. Like a long winter, it’s gotten tiresome. It seems like it’s time to replace that with the grace of energy and possibility.


Grace. Having decided that I wanted something non-electronic in my hand to read for our trip to South Beach, we headed out to Barnes & Noble with our friend Cindy. Much to our surprise — on a cold, sunny January day — the parking lot was quite full, and the store was quite busy with book buyers. There wasn’t anything in particular that I had in mind to purchase. A hardcover (a real book in my thinking) seemed like a nice indulgence that would be a welcome change of pace from the books on the iPad — non-fiction rather than fiction seemed like a good choice as well.

(For whatever reason, a hardcover book seems like something to be savored. The iPad book — something to get through.)

After wandering about the store for a bit, I came across a section of award-winning books. One, in particular, caught my eye.

The Art of Grace, by Sarah L. Kaufman, certainly has an interesting title. Reading a bit of the book and book jacket, I was intrigued to see that Ms. Kaufman was going to talk about Grace in light of history, religion, Motown, tennis, Hollywood, art and dance — to name a few. Her words.

Grace — the kind I’m talking about, everyday grace, honest and disarming — doesn’t exist without a test. It is most apparent when we have fallen, when we are bare. It is revealed in the simply act of paying attention, when a subtle change, a bit of hidden choreography or an unexpected show of understanding suddenly becomes a moment of truth. We just have to look.

We just have to look.

Looking is what I seem to be doing, and not looking very hard to see evidence of grace all around. Grace is in the hustle I see in so many people working to make their lives, and the lives of others around them, better. Everyday grace, honest and disarming.


Inspiration. It can come from many places and is something to be savored and appreciated. It is not always there. A new love, great book, visited place, opportunity or situation in our lives can spur excitement and possibility.

This is truly a great thing.

I just came across the following quote — I had long ago shared this with the choir I was directing, as it had been shared with me by a professor.

“Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it!”

– attributed to Goethe

“Begin it” has an element of newness to it. Not as often, when we stay with something or someone, and are loyal, and we encounter newness, we can be inspired in a much deeper way.

With this inspiration, we are assured that we know and understand the people involved. We’ve seen them at their best, maybe not quite their best, but mostly in their daily lives.

They know us too and they’re ok with us the way we are.


These days, I find inspiration among the hardest working people I know. They are horsemen and fighters. They are women and men, younger and older, new to a sport, in it for a long time.

The horsemen creating this latest inspiration are people who work and play at our new, private barn where we board our horse, Bo. Many of these people also work outside of this barn, but gather in this place to create something new and better. When I do see each one of these people, it might make sense for them to be resting. Instead, they show up early to a cold, damp barn on Sunday mornings (as we do) when others are tucked warmly in bed. They might ride horses, they might walk horses or they might clean stalls. They might manage the barn, or oversee the training of the horses. They might be installing ductwork or putting mirrors in the arena. They work hard to make this new place an ideal, or to make a few more bucks to meet whatever their ideal world is. They work toward their vision. And Mario says, “no one person is more important than other”. We all contribute different things. Some of us pay board; some are working students. Everyone works and works hard.

IMG_2226

In the words of a legendary rock guitarist, “I was always told if you want something you work for it”. There is no reliance on having others do it for you. It’s a short sentence. You can try to interpret it, but you shouldn’t get too far. It’s not a complicated thought.

And in that thought, there is great struggle and great joy. Not everyone I encounter wants to put the time in. Many want to rely on others, are on their past accomplishments, to move forward.

The “work for it” vision doesn’t involve taking advantage of others. Work for what you want. “You do it”, as a riding instructor often told me with an emphasis on “you”. (Her instructions were always simple, straight to the point and pretty deep.) The horse won’t do it; the instructor won’t. You do it. You put your leg there; you ask; maybe you go. Maybe not. Maybe that horse throws you on the ground or scrapes you against the wall. You figure it out.

These people work. They don’t acquiesce. They don’t take “no” for an answer, and they’re not willing to settle for anything less than their vision, and they’re not looking for others to do it for them.

They inspire, and they should.

12391996_1223991454282794_1084299048987183058_n

Every week at this barn, I see improvement. One week, it’s better lighting. Then, there’s heat in the barn (yes, for the horses); internet access; a better stall with more natural sunlight, an old coffee pot that still wants to do its job, a heated shower (for the horses), a freshly dragged arena, a clean horse, a new big screen TV to review video, a free horse show for those who have encountered difficulty in their lives.

Sometimes, not always, we stay with people and are rewarded. That’s not always the case. Perhaps karma will sort everything out. Probably not.


At the gym where I train in Muay Thai, the mats are clean. People share their wisdom and passion for Muay Thai. There might be 4 people in the class; there might be 40. For the instructor, their passion and interest isn’t reflected by more or less students.

The child in us can see this and tell the difference between authenticity and those things that are fake. This photo is a testament to that.

IMG_2222

Some people fight for themselves. They work hard for what they want and make the world a better place.

IMG_2223

MMA fighters, in particular, work for what they want. At the end of the day, they shake hands and embrace their opponent. They may be fighting each other, but truth be told, they are really fighting to get somewhere. They would gladly root for the other guy, but maybe next fight. I’m glad to know them. They work very hard and are tremendously disciplined.

IMG_0573

The people that inspire me the most, are the ones that work the hardest for their dreams. They may never be prize fighters, Olympic medalists or world-renowned trainers. They will, however, have a lasting impact on their world and those around them. In so many ways, they seem so much more important than the prize fighter or the Olympic medalist. They such a positive impact on the world in ways that don’t involve just themselves. I’m glad to know them all, and be part of their world.