Installing SSH
It is very simple to install ssh on an ubuntu (or variant) system. Simply type the following in a console:
sudo aptitude install ssh
This will install the program, and set it up with the default settings, which you will likely want to change.
Next we need to take a look at the configuration.
This next part will need to be done as root, so make sure that you’re careful!
Open up the run dialog ( alt-F2 ) and type:
gksudo gedit /etc/ssh/sshd_conf
Generally, the first thing I would change would be the port number. I use a nonstandard one to avoid 90% of the script kiddies that try to hack the system. Along with other tools, which will be talked about some other time!
A couple of additions I tend to make to the standard SSH config would be:
AllowUsers rwooden nx
X11Forwarding yes
This allows only the users I specify (rwooden, and nx), then allows X11 forwarding, which lets you run graphical applications on remote computers that have an X session open which is possible on most operating systems.
There are tonnes of settings to play with here, but be very careful to only change things which you understand! If you want more info on the settings, just type man sshd_config into a console, and you get more info than you could need!
With the changes made, save the file, and run the following to restart the ssh server:
sudo /etc/init.d/ssh restart
And you’re good to go!
Now you can try logging in from a different computer. Assuming it is also a linux system, bring up a terminal, and type ssh ip replacing ip with your computers ip address, or if you changed the port like myself, you would type ssh ip -p port again replacing the appropriate values.
And there you have it, a working ssh server for your own personal use!
Later on I will have more details on securing the server, and doing some pretty cool things with it.