www.howardism.org
Babblings of an aging geek in love with the Absurd, his family, and his own hubris.... oh, and Lisp.

New Access Method

This tutorial is a step-by-step guide for getting your Mac to transfer files to a server system in the most secure and reliable way…without being too obnoxious.

This involves an technique called Public-key cryptography (technically called asymmetric cryptography), where you have a private key on your computer, and a public key on the server. Only the person in possession of the private key can authenticate itself to the server.

Think of your private key as an actual key and your public key as the locks you place on your servers. To access my server, you would send me your public key for me to place as the lock on your account.

ssh-access-00.png

To set this up, just follow these three steps.

Step 1. Create an SSH Key

To begin, you need to create both a private and a public key. I’m afraid that the simplest way to create both of these is to open Terminal, and type the command: ssh-keygen

ssh-access-01.png

Note: If you computer runs the risk of being stolen, ignore my advice and enter a passphrase (password) to protect your key.

Step 2. Email me the Public Key

In an email to me, click the Attachments button, and go to your home directory, which would most likely be your name. In this screen shot, I would click on howard.

The folder we want is hidden, so to show this, hit the magic sequence: Command and Shift and then the period. Scroll down…

ssh-access-02.png

You should be able to see a folder called .ssh (Notice the initial period). Double-click on that, and then double-click on the id_rsa.pub (the one with the .pub ending):

ssh-access-03.png

If you tell me the exact directory that contains your web site files, then I may be able to give you a magic program that automatically copy the site to my server.

Either way, when I get the public key, I will use it to place a lock on your account, and I’ll let you know when you are ready for the next steps…

Step 3. Use an SCP Program, like Cyberduck

Once the lock is in place, you just need to use a good file transfer tool to copy your files (like your web site) to my server. This should do SFTP (also called SSH).

For this example, I will be using Cyberduck. To transfer files, you will grab files from Finder and drag them to the Cyberduck window to copy them to the server.

When you first start it, go to the Cyberduck menu, and select Preferences and change the Default protocol to SFTP:

ssh-access-04.png

Now, click the + button at the bottom left corner to create a new connection. Fill in the form to match this:

ssh-access-05.png

I will give you the values for both the Username (see #1) and Path (see #2) in the image above, as these are values on the server.