Archive for March, 2007

SSH Without A Password

Friday, March 23rd, 2007

ssh without a passwordWhen you start using SSH you’ll quickly find it asks for your password. Frequently. Murphy copies files to the web server over an SSH transport and each new copy operation prompts for a password. But it doesn’t have to be that way. Set up an SSH key pair and the keys will handle authentication.

The steps to implement your key pair are pretty straight forward. On the client computer you execute one command that generates the key pair. Then you add the contents of the public key to a file called authorized_keys2 on the server. If the file doesn’t exist on the server you can simply rename your public key file to authorized_keys2 and you’re done.

That’s it. Once the authorized_keys2 file contains your public key you can login with SSH from any machine with the private key. The logic is that only someone with proper credentials could have placed the public key in the appropriate folder on the server. And once that public key is in place only the corresponding private key will be authenticated without a password.

Here’s the really interesting thing about all these keys: You can give that same public key to as many people as you want. And even though they can all use it, and only it, to verify that you have the corresponding private key, they cannot ascertain what that private key is. The underlying technology is called asymmetric cryptography in case you want to know more.

Once you’ve set up the keys like we’ll show you in the screencast you can use other tools without passwords too, like scp and rsync for copying files. We’ll get to scp in a later screencast. Murphy introduced rsync as a way to copy an iWeb site to a third-party server.

This screencast picks up where we left off yesterday, with SSH already up and running.

Watch Now

Remote Login With SSH

Thursday, March 22nd, 2007

Remote Login With SSHConnecting with SSH is really easy. It’s what you do once you get connected that can be tricky. When you connect to another machine with SSH it’s just like you’re sitting at that machine running a Terminal session.That gives you a lot of power, and raises the potential for disaster. If you haven’t worked through Murphy’s other Terminal posts you might want to check them out before getting started.

We’re going to show you how to enable an account on your Mac for SSH access. Once that’s done you can access that Mac from other computers running just about any OS.

A great thing about SSH: It works well over slow connections. It’s not like a VNC session where you’re left wondering if the screen has updated or you’re scrolling around a 23″ display on a 15″ screen.

More importantly, SSH is secure. In fact, that’s what it’s called, Secure Shell. Your communications are conducted through an encrypted session and your passwords are always protected.

Once you have SSH up and running we’ll show you some other tricks, starting tomorrow. We’ll cover how to initiate an SSH session without using a password. This comes in handy if you have a frequent need for SSH or you have scripts that rely on its functionality.

You can connect from a PC too. Download and run the Putty exe. You’ll be able to access a Mac enabled for Remote Login.

What about connecting to your home Mac from Starbucks? You can do it, but if your home network is behind something like a Linksys or Netgear router you’ll need to forward port 22 to the machine running the SSH server. If you’re comfortable using the Terminal you’re more than capable of setting this up! For more details on port forwarding see Murphy’s post covering VNC.

If you’re not comfortable using the Terminal or you’re brand new to it - make sure you check out Murphy’s warning about the damage you can do.

When you’re up to speed on Terminal watch the screencast to get started with SSH.

Watch Now

Image Capture Remote Control

Wednesday, March 21st, 2007

Image Capture Remote ControlWith iPhoto, Lightroom, Aperture and Photoshop getting so much attention it’s easy to overlook Image Capture. It’s a quick way to download images from your camera, especially if you just want to drop them into a Finder folder. But that’s not we’re going to talk about here.

Image Capture knows a few other tricks too. You can share a camera connected to your Mac so users at other machines can see the images on the camera. They can also take a picture with the camera and see the image right away. You could use this to monitor a remote location.

There are other ways to see what a remote camera sees - like Skype. You can configure Skype to automatically accept incoming calls and start a video conference. Skype will work with USB web cams, certain camcorders, and your built-in iSight. In other words, cameras Image Capture doesn’t work with. You won’t have to mess with port forwarding either.

Murphy Mac reader Steven R. reminds us that different cameras will behave differently. For example, Murphy has a D70 that needs to be taken out of USB Mass Storage mode before Image Capture can remote control it. Check your camera’s USB settings before getting started.

Here are some other things to consider:

  • For remote monitoring you can use a variety of iSight tools that Murphy will take a look at in future screencasts.
  • You probably don’t want your expensive SLR taking 20 shots an hour for remote monitoring. The shutter won’t last as long as you might think.
  • While creating the screencast Murphy’s camera was loaded with RAW images, and performance in the web browser was slow. You might want to clear your card off before playing with this feature. Plus, the remote monitor could delete photos you haven’t transferred off the card yet. Be careful!
  • Features like Stealth Mode in your Sharing preferences can get in the way of the features described here, you should turn it off when getting started with Image Capture’s remote features.
  • Connecting to Image Capture from across the Internet will require port forwarding on your router, if you have one. You need to forward port 5100 to the computer that has the camera connected to it. For more information on port forwarding take a look at Murphy’s post about Chicken of the VNC. That screencast shows how to configure a router to forward a port.
Watch Now

Dragging Tabs and URLs

Tuesday, March 20th, 2007

Dragging TabsUsually we save Monday for the really easy stuff. Murphy was a little late getting back from vacation, so this week it’s Tuesday.You can drag a URL from one window to another in Safari and Firefox.

You can create a new tab this way in Safari, or just drag a tab in Firefox. You can even drag a URL from Firefox to Safari.

In the screencast Murphy covers all the details. He’ll also show dropping a URL on the Desktop and dragging a background window - for a little bonus.

Watch Now

Murphy Has Returned

Monday, March 19th, 2007

MagsafeWe should be back in the screencast business tonight at some point. Murphy thanks you for your patience in his absence.

Here’s a tidbit some of you might find interesting. Murph took the Macbook Pro on this trip, traveling with it for the first time. He also purchased a Magsafe Airline Power Adapter. The adapter worked as expected on two US Airways flights served by Airbus A330s.

Airplane seats don’t have enough juice to charge the laptop, but Murphy was able to use it as much as he liked on two long flights. Interestingly, the cable stayed green during use, even when the battery wasn’t charged. The menubar constantly said “calculating.”

The only problem was that Murphy was flying coach, leaving little room in the lap for a Macbook Pro 15″ notebook. Especially when the seat ahead is tilted back. But the Magsafe magnetic coupling is very useful on an airplane, with people getting up and down and tray tables and armrests trying to tangle things up.

Check seatguru.com and see if your plane is equipped with in-seat power. The Magsafe comes with two different plug shapes.

Here’s another tip: If you’ll be forced to leave your computer behind in a hotel you might want to check in advance about the house safe. The MBP is too big for most room safes. And a Kensington cable isn’t enough for true peace of mind, they can be defeated.

Murphy usually leaves the laptop behind, but on this trip there were some tasks that had to be done. The quarters were too tight on the plane for real work, but the MBP did well for episodes of The Office pulled from a TiVo.

If you decide to get the Magsafe, think about getting it from Amazon and giving a little back to Murphy!