Setting Up an SSH Server

If not installed already, you can install the OpenSSH server through Synaptic by adding the openssh-server package. As you might have guessed, sshd is the name for the SSH server daemon.

Start by configuring your firewall to allow connections through port 22. If this port is blocked, you cannot use SSH. See Chapter 19, “Securing Your Machines,” for help doing this.

Two different versions of SSH exist, SSH1 and SSH2. The latter is newer and more secure, comes with more features, and is the default in Ubuntu. Support for SSH1 clients is best left disabled so that older clients cannot connect. This is done by default in the /etc/ssh/sshd_config file on this line:

Protocol 2

If you have no other option and absolutely have ...

Get Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.