Server week : The essential SSH Server.

Mar 18

This week in “Server week” we are going to set up a variety of servers that allow you to do a variety of things. One of the most basic and versatile server you can set up must be the SSH Server. Long time fans probably know that the SSH server is the base ingredient for a lot of fun stuff you can do. For example.

  • Transfer files over the internet.
  • Work with command line applications from a remote computer.
  • Tunnel your browser traffic through your own server to stop nosy network admins.
  • Connect to your home network with a VPN connection.

These are just a couple of things you can do, but before you can do that, you will need the basic ingredient : Let’s set up an SSH Server.

MOTD_TAIL

Required ingredients.

  • Debian based Linux distribution : ( you can do it with a redhat based one too, but we use a debian based one for the tutorial)
  • Static ip for your Linux distribution.
  • Connection to the internet.
  • If you don’t have a static IP : A dynamic DNS service like opendns or Dyndns.
  • An open port on your router forwarded to your linux machine.

Let’s get cooking.

  • Open up a terminal on your linux machine and type : sudo apt-get install openssh-server
  • After the server is installed, connect to it from a remote machine using a terminal application like Putty (for Windows) Secure Shell (for the Chromebooks) or from the terminal on other Mac and Linux machines.
  • Connect to your Linux server with the command : ssh yourusername@theipofyourserver

And starting out that is ALL you need to do. If you want to do this from the internet you need to forward the correct port (The standard port is Port 22) from your router to your linux machine so you can make it accessible from the internet.

Lets make it pretty.

Lets make it secure.

  • SSH servers run standard on port 22, so a lot of scriptkiddies will go around the internet and “knock” on your port 22 to see if there is a server there. We are going to “obscure” the location of your SSH server a little by changing the default portnumber (Remember you also need to adjust this on your server) Follow THIS tutorial to get you started.
  • Next time you connect remember to connect with ssh -p portnumberyouchose yourusername@theipofyourserver
  • If you want to get rid of entering your password when you connect you can log in using secure SSH keys. Its a little bit on the advanced geeky side but it DOES keep your machine extremely secure : Only a machine with a unique digital fingerprint can connect using this method : Here is a good tutorial.

Lets start using it.

The SSH server offers you a variety of functionalities we talked about in previous blogposts. We will line up the best uses for SSH here.

These are just a couple of examples of what you can do over this very powerful little SSH connection. Remember always to use strong passwords and keep your server up to date.  Have fun ! 

Related Posts

Setting up your own SSH proxy on Windows.

Jan 22

Free wifi is great. It’s like finding an oasis in the middle of the desert that gives you the ability to quench your digital thirst before you wade into the offline sahara once again. But “Open and Free” wifi comes at a price. Being a shared network medium, it means that all traffic on the wireless network is visible to all users on that network , should they care to take a peak.

With networking tools like “Wireshark” it is fairly easy sniff traffic on an open wifi network and intercept all kinds of unencrypted traffic. That traffic can consist of what URL’s you surf to to what passwords you use (if you have an unsecured connection) .. They are all there for anyone to sniff, download and analyse.

To keep your browser traffic private all you need to do is encrypt it. One of the ways to do this is of course use https connections where you can, but if that is not possible there are alternatives. You can set up your own SSH proxy server. This means you will be creating an encrypted tunnel from your laptop, TROUGH the internet, to your home server. Once there (behind the security of your own firewall) your traffic heads for the internet. Its like surfing at home, but you are in fact ‘away from home’. 

The only thing you need are :

– Access over SSH to a linux server.  ( Check our our tutorial on how to set this up) 

– A copy of Firefox.

A copy of Putty.

putty-ssh-tunnel

Setting it up is quite easy , and we will probably do a screencast on the issue in season 8 of our podcast, but instead of boring you with a lot of text , we are going to point you to the excellent podcast episode Kurtis Adkins did for Hacker Public Radio on the topic. Take 20 minutes and listen carefully. When you are done (and have the ingredients above) you will be able to secure your webtraffic from anyone who wants to snoop around. (Hackers, scriptkiddies or nosy sysadmins) 

Link : Curtis Adkins on : Setting up and using SSH and SOCKS (Hacker public Radio ep 1422)

Related Posts

The A to Z of Osx command line commands.

Oct 15

With the shiny fancy walled garden that OSX Mountain Lion is today, we sometimes forget what is under the hood. Apple’s minimalistic and well designed interface might be clutter free, but the downside of this “Designer kitchen of computing” is that there are not a lot of hints to what powers lurk beneath its glossy surface. Unlike cluttered Windows (and Linux) programs from days gone by, riddled with cascading menu’s and massive help files, you have to be “in the know’ to  access some of the features.  

So today we have the A to Z of OSX terminal commands for you. Have fun revealing the power of the Unix like heat that beats in your big cat and have fun with THIS A TO Z index of commmand line commands. You can get started with some “basics” , make your Mac talk with the “say” command ,  or read the bible from Apple on the command line.

As a real cross platform slider you of course don’t have to be physically at your machine. You can turn your mac into an SSH server and connect from any other system using the terminal on your Linux machine,  or from another mac. Or from your IOS device, your Android Smartphone or your Windows box.

Related Posts