Installing OpenSSH on Ubuntu Linux (SSH Part 1)
Secure Shell (SSH) is a protocol that uses encryption to create a secure channel from a local computer to a remote computer. It is primarily used to execute commands on a remote host via a terminal session. In addition, it allows for tunneling and file transfer. It’s a handy little tool that allows remote access with a fair sense of security. It’s very simple to install on Ubuntu with the Advanced Packaging Tool (APT).
(*note: Commands preceded by a “$” are run as a normal user and commands preceded by a “#” are run as root.)
The first thing we need to do is become root. Issue the following command from a command prompt:
$ su
Enter your root password when prompted.
If successful, you will be returned to the command prompt with root privileges.
Before we use the apt command it is usually a good idea to update the available package database. That’s done with the following command:
# apt-get update
Package information will be downloaded from apt’s sources and will then be merged into the available package database. If this command doesn’t complete without error try running it again and see if it finishes cleanly.
Now you’re ready to install OpenSSH. We’ll let apt do all the work for us. Just issue the following command:
# apt-get install ssh
Apt will not only install OpenSSH but it also determines if there are any dependencies that are required. If so, it will install them as well. You may be prompted to confirm the installation. Press “Y” to continue.
Apt will proceed to download the necessary files, run the installation scripts, and generate the necessary encryption keys for your system. Once done the ssh service will be started.
You’re all done, lets exit out of the root session.
# exit
No more root session for us….
We’re done for now… time to logout.
$ exit
Nicely done!
Continue on to the second half of this tutorial: Using Putty to Access a Remote Host (SSH Part 2)
Tags: encryption, linux, secure shell, ssh, terminal session, ubuntu












andrew said,
Wrote on December 22, 2007 @ 8:03 am
nice tutorial…i’m very2 love it..
Steve Bragg said,
Wrote on February 5, 2008 @ 6:43 pm
This does not work on Gutsy Gibbon. It just screams, “Couldn’t find package ssh”.
Rats. Another hour down the Linux black hole…
Jeremy said,
Wrote on February 19, 2008 @ 12:12 pm
Hey JR
3R1C0 said,
Wrote on June 4, 2008 @ 4:30 am
Fabulous !
Tank’s
Cian Muldoon said,
Wrote on July 24, 2008 @ 4:04 am
Steve try:
sudo apt-get install openssh-client
sudo apt-get install openssh-server