Spectralcat's Blog

July 2, 2009

Part VII: Liberating the Asus 1000HE: Setting up Filesharing on a Unix-Based (Linux and Mac) Home Network Via SSH

Filed under: Uncategorized — Tags: , , , , , , — spectralcat @ 1:31 am

Because the 1000He does not come with a dvd drive (this is good; it makes the netbook lighter!), it’s a good idea to configure it to connect the other computers on your network. This lets you access the dvd drive on a different desktop computer or laptop on your network; it also lets you easily copy files to and from the eeepc to the other computers on your network.

SSH is an easy and powerful program for sharing files between computers on a home network. It works best for setting up a network consisting of Unix based computers (Linux and Mac computers). I believe there are ways of getting Windows to share and receive files via SSH (using cygwin for instance), but to do this kind of sharing you probably want to use Samba instead of SSH.

To get SSH running on your netbook, open Synaptic and install: openssh-client (already installed in Eeebuntu) and openssh-server. Because setting up openssh-server makes your eeepc a little less secure you’ll want to make sure you’ve selected a strong password for your eeepc and you’ll want to install a program to configure your Firewall as well. I recommend installing Firestarter. Make sure you’ve got the opensssh programs (and a firewall) installed on all of the computers on your network that you want to connect together. This is easy in my case because I’m setting up file-sharing between two Linux computers, but it gets a bit tricker to connect your eeepc to a Mac computer. To get a Mac OS X computer to share information via ssh (to allow remote login) see here.

Then to get your Mac OS X computer to view files via SSH on your Eeebuntu netbook, install Cyberduck.  (Yep the name’s stupid, but you’re using a fucking Mac. What did you expect?)

Next, I want to determine the IP addresses and MAC addresses of all the computers on my network that I want to set up file sharing for. The easiest way to do this is to open a Terminal (Applications: Accesories: Terminal) and type:

sudo ifconfig

On the eeepc, my IP address is located after “inet addr:” under the ra0 section (the ra0 is the wireless section; the eth0 is for the ethernet connection). The MAC address for my wireless connection is located after “Hwaddr” under the ra0 section. Write these numbers down. Now open a terminal and run sudo ifconfig on all of the Unix-based computers you want to connect to and write down their IP addresses and MAC addresses.

Next, we want to assign static IP address to all of the computers on our network. This will allow us later on to create bookmarks for each of the computers we want to connect to. Open Firefox and log into your router by typing its IP address. (I do this by typing into the address window on my Acer router, but the number you type into your router will vary depending on your router model and manufacturer. If you don’t know the right IP address for your router, do a google search for it.) Now add a “static address” (a “static lease”) for each computer on your network that you want to connect to: this should be as simple as finding the section for entering static leases, typing in the MAC address and corresponding IP address for each computer, pressing save, and restarting your router. Now every time you connect your computer to your router, your router will notice your computer’s MAC address and assign this exact same IP address to it.

Now let’s set up the firewall program Firestarter on our eeepc. Go to Applications: Internet: Firestarter. When the Firestarter wizard begins press: Forward: select ra0 as the ethernet device (we’re only configuring ssh for our wifi address, you would use eth0 for the ethernet port): select address assigned via dhcp: ignore “the enable internet connection sharing feature” by just pressing Forward: leave “start firewall now” checked and press save. On the Firestarter window, select Policy: leave “Inbound traffic policy” selected: right-click under the second window titled “allow service port for” and select “add rule”: for Name enter SSH, for Port enter 22: check “when the source is ip, host, or network” and type the static IP address of the computer on your network that you want to allow to access your eeepc (for instance: select Add: then click “Apply Policy.” You can now safely exit out of Firestarter and even though the Firestarter icon will disappear from your system tray, your firewall will be up and running (and start running again when you turn on your computer). (Actually on an ubuntu-based computer, your real firewall (called iptables) was installed and set up to run when you installed Eeebuntu; it was just ignoring everything ever other computer on your network was saying to it. We just used Firestarter to configure iptables to start paying attention to the the ssh requests for a particular computer on your network.) Open the firewall program on the other computers on your network and allow ssh service for port 22 as well. If possible specify the IP address of the particular computers you want to allow to access port 22.

Next open a terminal on your eeepc and start an ssh connection with one of the computers on your network by typing the following: ssh username@ipaddress (replace username with the log in name on the computer you are sshing into and replace the ip address with the appropriate static address of that computer, for example: tommy@ When you hit enter you will be asked a question about an RSA key fingerprint, type yes and hit enter. Then enter the password of the user on the computer you are logging in as (for instance, tommy’s password). Congratulations you know have total control over that user’s files. Type exit to log out.

Now let’s set it up so that we don’t have to use the terminal to connect to the other computers on our network. Open Nautilus by going to the panel at the top of the screen and selecting: Places: Home. In the address bar in Nautilus type the following: sftp://username@ipaddress and hit enter, then enter the password, select whether you want to remember it, and select “Connect.” Nautilus should now display that computer’s file system. Navigate to the user’s home folder and then select Bookmarks: add bookmark. A bookmark for the computer on your network should now be displayed under the Places menu at the top of your screen. If you want to change the name of the bookmark, open Nautilus again by going to Places: Home and select Bookmarks: edit bookmarks. Repeat as necessary for the other computers on your network.

You can put a dvd in the dvd drive of a different computer on your network and play that dvd with vlc on your eeepc. Just locate the dvd drive using Nautilus, then right-click on the VIDEO_TS folder and select open with vlc.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: