Android, Hacks, Linux

How to SSH into your home computer to access media files, documents, processes, or anything else you might need

I wanted access to my home machine so I could access any files I want. Dropbox is pretty awesome, but if you’ve forgotten to put something in your Dropbox folder, you’ll be in deep trouble.

(1) Run “sudo apt-get install openssh-server” at the command line.

(2) Run “sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original”. This copies your original configuration file for SSH so if you muck up the settings, you can always replace them.

(3) Run “sudo kate /etc/ssh/sshd_config” (or whatever text editor you use) and change the port number from 22 to another port so you won’t be targeted by so many bots.

(4) Ensure that your firewall isn’t blocking the port you chose. You may need to add SSH as a running service. You should probably also include ‘sshd’ as a startup application in your distro so that if you need to do a remote reboot, the service restarts and you can log back in.

(5) Forward the port
being used for SSH in your router. To do this, you need the internal IP address of your computer on your home network, as I presume you’re not dumb enough to directly connect your home machine to a modem. Ask me if you have problems figuring out how to forward the port.

(6) Get out your Android phone if you have one, since a connection over 3G will mean that you can test your SSH connection without ever leaving your comfy chair. Install ConnectBot through Android Market.

(7) Open ConnectBot (or any SSH client from any machine; Putty will work well) and type in your home machine username, your external IP address, and if you have changed the port, include that as well. Here’s the format: username@000.000.000.000:XXXXX Where 000.000.000.000 is your external IP address and XXXXX is the port number you chose to replace the default.

(8) If you have issues getting a connection, hit me in the comments; I had several oddities in router configuration making this work, even though it’s
quite simple in theory.

Leave a Reply