VerySimple Developer Blog
Technical Tips, Tricks and Rants.

Archive for the ‘Digital Life’ Category

 
Mar
09
Filed Under (Digital Life) by Jason on 09-03-2008

This is a simple way to mount an OSX shared folder over SSH without installing any additional software. For this to work you must be sharing a folder using AFP (Apple File Sharing) protocol and have “Remote Login” (i.e. SSH) enabled. These settings are all found in System Preferences->Sharing. If your server is behind a firewall, you must open the SSH port (usually port 22).

Step One: Open up terminal and enter the following command:

ssh -N -p 22 -c 3des USERNAME@HOSTNAME -L 5480/localhost/548

Replace USERNAME with the remote username and replace HOSTNAME with the domain name or IP address of your server. For example jason@192.168.1.100. If you run SSH on a non-standard port, you can also replace 22 with your port number. You’ll be prompted for a password then you won’t see any further output.

This creates an SSH tunnel from local port 5480 to remote port 548. In Apple terms you might think of this as an alias. The remote server’s incoming port 548 is the default port used by Apple File Sharing service. Our local outgoing port 5480, on the other hand, is just an open port that is not known to be used by any common service. The outgoing port is not actually important, but these instructions assume you’re using 5480. Anyway, you might think of your tunnel as something like this:

local port 5480 -> SSH -> Internet -> SSH -> remote port 548

Step Two: Click anywhere on your desktop or open Finder so that you see the “Go” menu in your menu bar. Select from the menu bar: Go-> Connect to Server…

In the server address, enter “afp://localhost:5480″ (without the quotes)

This may seem crazy because it appears you are connecting to “localhost” which would normally be your local computer. Remember, though, the SSH tunnel connects local port 5480 to remote port 548. So we are actually connecting to port 548 on the remote machine.

After a moment you should get a standard login dialog. Enter your remote username/password and you’ll be presented with the available shares. Select the share you want and you should see it appear in the Finder in a moment. That’s it! You can now open and drag/drop files. The connection will probably be slower depending on your connection speed, but otherwise it works the same as if you were connecting directly.

(Optional) Additional Software and Alternatives

If you’re uncomfortable with the command like, there’s a GUI application for connecting to SSH servers and creating tunnels called SSH Tunnel Manager. You can download it from http://projects.tynsoe.org/en/stm/. The functionality is the same, but if you prefer clicking a button instead of typing in the terminal window, it can be useful.

Another method for connecting to shares over SSH is through an application called MacFuse with it’s required counterpart sshfs. This may look the same as an SSH tunnel, but is technically very different. MacFuse is a program that allows you to make anything appear to be a file system and SSH is just one of the possible implementations. You might say that this app tricks your computer into thinking something is a local hard drive. I gave MacFuse a try and personally did not find it reliable. A plain old SSH tunnel works great for me so I don’t plan to use MacFuse for this purpose. However it is an interesting idea and has many other uses.

Please feel free to leave a comment if you have any remote connection tips or tricks.

 

 
Mar
03
Filed Under (Digital Life, iPhone) by Jason on 03-03-2008

In case it’s not obvious from my recent posts I’ve purchased an iPhone. Even though the phone has a bunch of great features, I was concerned that I wouldn’t have enough disk space to get rid of my iPod. I have roughly half of the drive space (going from a 30Gb iPod to a 16Gb iPhone). My personal collection of music is around 20Gb so my iPod had enough space to sync everything automatically. With only 16Gb on the iPhone, though, I now have to manually manage my music. For those who have the 8Gb version, I’m sure it’s even more drastic.

I thought this manual process was going to be a drag, however I discovered a setup that is fairly low maintenance. I created two playlists in iTunes and configured the iPhone to sync with them instead of All Songs. These are not playlists for listening, rather they’re only used for syncing purposes.

The first is a regular playlist called “iPhone” and I drag my essential albums here that I always want to have with me. The second playlist is a “smart playlist.” If you haven’t used the smart playlist feature, it’s basically a filtered search result that functions as a playlist. My smart playlist is configured to include the most recently added 5Gb of music. I have a few filters to make sure it is only music and not podcasts and video (see screenshot).

Smart Playlist

This setup is pretty nice because my essentials always synced and I can change them as needed by editing the playlist. The most recent music that I’ve bought is synced automatically without me doing anything. It makes sense because I would usually want to listen to the stuff that I’ve just added. The iPhone only syncs one copy of each song so duplicates are not a problem.

If you have any tips or tricks for managing your own music, please feel free to post a comment.

 

 
Dec
07
Filed Under (Digital Life) by Jason on 07-12-2007

In this modern age we live in, who has time to backup their data? It’s such a hassle! Not to mention it’s really complicated and expensive. I was thinking about backups the other day and there’s practically *no reason* to do it! In fact, I came up with 10 reasons not to make backups. I think if you take a moment to read them you’ll agree with me that backups are simply a waste of time.

1. I just got a new computer, it’s not going to break

We all know that new stuff *never* breaks. Come on! Things only break after years and years. I’ve never purchased one single item that I had to return right away because it didn’t work correctly.

2. I’m really nice to my computer. People who lose their data probably are hitting their computer or something.

People who lose their data are obviously physically harming their computer in some way. They just don’t admit it because they’re embarrassed. Me, on the other hand, I am very gentle with my computer. I even give it a goodnight kiss before bed every evening.

3. Oh, I’m going to back up my files as soon as I get a chance…

I was planning on backing up my files last month but I got so busy, you know. I just didn’t get around to it. I’ll get to it pretty soon, though.

4. Hard drives start clicking before they crash - I’m confident I’ll be able to tell when it’s about to go.

Everybody knows that hard drives don’t just die instantly. They start clicking and making weird noises weeks before they crash. There’s plenty of warning. Besides, if it does crash, I’ll just stick it in the freezer and that’ll give me a few hours to get my data back.

5. My data isn’t really that important, I wouldn’t be too upset if it got lost.

I really wouldn’t miss any of my data if it got deleted. I have a lot of digital photos of vacations and my favorite niece when she was a baby and about 200 albums in iTunes or whatever. But, I don’t really need that stuff. It’s not like my quicken bank file, job resume or my thesis or anything important is on there.

6. Making backups is too technical and complicated to do correctly.

Making backups is so technical. You have to have giant tape machines and take them to a a bank vault and all of that stuff to do it properly. I can’t deal with that! Making a copy to an external drive is not really the right way to do it, so why even bother?
7. Backups are something that big companies do. Home users don’t need to worry about backups.

They backup stuff at work so I don’t really have to backup my own machine as well. I probably have some of my stuff on floppy drives somewhere anyway.

8. I don’t have anywhere to store my backup data.

If there were some free magical place where I could backup my files I might do it. I don’t really have any storage space to spare because my external drive is all filled up and I can’t really afford another one.

9. I don’t have time to wait around for my stuff to back up.

It takes forever to backup files. I don’t have time to sita around and wait on that. It makes me uncomfortable to have my computer doing stuff while I’m not watching it.

10. I could always just call a data recovery service to get the stuff off of my drive - it’s never totally gone.

Those recovery guys can get anything back off of your drive even if you dip it in gasoline and light it on fire! It’s not like somebody would ever steal my laptop or something. I’m totally rich, though, so I can afford it either way.

~~~

There you have it. Ten compelling reasons not to backup your files. Are you convinced? Leave me a comment and let me know how you feel about it.

 

« Previous Entries
Close
  • Social Web

NOTE: Email is disabled

E-mail It