Category Archives: Apple

Passwordless SSH Login between OS X and Remote Server

terminal-iconIf you commonly ssh from your OS X computer to a remote server such as a web server it makes sense to set up passwordless ssh login so you can have a secure connection without having to always enter your password. Setting up passwordless login also allows you to run automated scripts to help with managing things like offsite backups. Scripts can’t be automated if they require someone to be present at your machine typing in passwords every time they run.

It’s worth noting that you may first want to check if you already have existing ssh keys on your computer. This can be done by entering cd ~/.ssh [enter] at your terminal. If you get a response back stating “No such file or directory” then you need to proceed with the following steps.

To set up passwordless login between a remote unix/linux server and your OS X machine fire up terminal and…

1. generate an RSA private key

ssh-keygen -t rsa -C “your_email@example.com”

2. copy the key to your clipboard

pbcopy < ~/.ssh/id_rsa.pub

3. ssh into the webserver

ssh username@yoursite.com (login with your password for the last time)

4. make a .ssh directory, if it doesn’t already exist

mkdir .ssh

5. create an authorized_keys file and paste in the key from mac that you just copied to your clipboard

vi .ssh/authorized_keys (paste in key from clipboard, save)

6. set permissions for necessary files and directories on webserver

chmod go-w ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

That’s all there is to it. These steps could all be combined into a single line but the above is much easier to follow.

Mac OSX Lion Cursor Disappeared? Get It Back

Mac OSX Cursor Gone
Did Lion devour my cursor?

From what I’ve found when searching online, I’m not the only one who has their cursor periodically disappear in OSX Lion. Once in a while I’ll return to my Mac Mini (my iMac and Macbook Pro never have this problem) and my cursor is nowhere to be found. The mouse or trackpad still works; if you go way down on the screen over the dock the hover affect will work but the cursor is still not visible.

Zoom the Screen

One way I found to bring the cursor back is to zoom the screen. If you don’t already know this, you can zoom in the screen at any time by holding down the ctrl key and scrolling up (or down depending on your system preferences). You can then zoom back to normal again by doing the opposite and, voila! Your cursor is back.

I can’t guarantee that this will work for you but it definitely works for me and I’ve heard from many others who say the same. Hopefully this tip will help you end the frustration of the missing Lion cursor.

If you have another solution to this issue, please do let me know in the comments. I’m sure others would love to hear about it too. The above solution works but it still annoying.

Fix ‘Unkown host’ Error on Mac

Have you ever had one of your websites become inaccessible on only one of your computers? The site loads up fine on every other machine you try it on but on this one machine, nada. If you try to ping the domain you’ll likely be presented with an ‘unknown host’ error.

If your computer is a Mac you will likely first think to try dscacheutil -flushcache . However, this will not work for you unless you are using an older version of OS X. Now what you’ll have to do is the following:

sudo killall -HUP mDNSResponder

In most cases this is what will work for you. I won’t bore you with a lengthy explanation of why. Just try it.

Apples to Apple: Fun and Interesting Infographic

Here’s a fun infographic comparing Apple, the company to apples, the fruit.

A few of my favorite points:

  • China produces 44% of the world’s apples and 100% of the world’s Apples
  • the average apple weighs about the same as an Apple iPhone 4s (5oz. versus 4.9oz.)
  • an iphone 4s is 33.6% glass

Thanks to MBA Online for putting this one together.

Apples to Apple: more similar than you might think
Apples to Apple: more similar than you might think

Command Line Tip: Position Cursor with the Mouse

command line tip - place your cursor with the mouse
Place your cursor with the mouse

When entering long commands in the terminal, making changes or fixing mistakes in the middle of the command can slow you down. Moving your cursor over one character at a time to get the to point where the change is needed takes too much time! Fortunately on a Mac you can actually use your mouse to position the cursor wherever you want in the current line.

The trick is to hold down the ‘Option’ key while clicking. Move your mouse pointer where you want the cursor and ‘Option-Click’. When doing this the cursor will actually move to that point in the line. I didn’t believe it until I tried it. It really works! Another command line time saver.

Twitter iPhone App and Instapaper: A Great Combo

Twitter iPhone App
Twitter iPhone App

If you’re like me an often come across useful links and tweets in your Twitter feed I can’t recommend this combination enough. I’ve used several different Twitter apps on my iPhones but the app that has one out for me is the actual app from Twitter. The app used to be called Tweetie and was a paid app. However, Twitter bought it in April of 2010 and made it free. Thanks Twitter!

I also use Instapaper to keep track of  items on the net that I don’t have time for when I come across them but want to read later. I used Instapaper infrequently prior to using the Twitter iPhone app but since finding the built in integration my Instapaper use has exploded.

It’s so useful to be able to go through my Twitter feed when I’m stuck in a line-up or at a red light and add them to my Instapaper list in a couple taps. Then, when I have a bit more time to kill I can fire up Instapaper the app and read all those juicy items I didn’t have time for previously.

Instapaper iPhone App
Instapaper iPhone App

Check out the Twitter iPhone App at the iTunes Store

Check out the Instapaper iPhone App at the iTunes Store

Check out the Instapaper site

Check out the Twitter site