Why we need ssh server?
By default ssh (secure shell) service is not installed on Ubuntu. (8.10 as of this writing). So you cannot login into the machine remotely. Having a ssh service running is very useful for securely logging in and working on the box remotely as all the traffic is encrypted between the terminal that issues the commands and the machine executing it.<!>
At first it might feel like a daunting task, but as you would see it very simple and very straight forward, a simple command and you are done, that easy
How to install it?
We will use our friend apt-get (software package installer) to install the required software packages. There are 2 packages ssh and openssh-server (implementation of ssh server) that needs to be installed. Also you need to be as root when you do it or sudo as root before you install.
so at the terminal execute the following command:
|mvohra@mvohra-laptop:~$ sudo apt-get install ssh openssh-server|
when prompted enter for the password and let apt-get take care for the rest. It would read the package list, fetch the package binaries, resolve the dependencies and finally install it as shown below.
|[sudo] password for mvohra:
Reading package lists... Done
Building dependency tree
Reading state information... Done
rssh molly-guard openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
0 upgraded, 2 newly installed, 0 to remove and 244 not upgraded.
Need to get 286kB of archives.
After this operation, 827kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com intrepid/main openssh-server 1:5.1p1-3ubuntu1 [285kB]
Get:2 http://us.archive.ubuntu.com intrepid/main ssh 1:5.1p1-3ubuntu1 [1246B]
Fetched 286kB in 1s (157kB/s)
Preconfiguring packages ...
Selecting previously deselected package openssh-server.
(Reading database ... 122268 files and directories currently installed.)
Unpacking openssh-server (from .../openssh-server_1%3a5.1p1-3ubuntu1_i386.deb) ...
Selecting previously deselected package ssh.
Unpacking ssh (from .../ssh_1%3a5.1p1-3ubuntu1_all.deb) ...
Processing triggers for ufw ...
Processing triggers for man-db ...
Setting up openssh-server (1:5.1p1-3ubuntu1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
* Restarting OpenBSD Secure Shell server sshd [ OK ]
Setting up ssh (1:5.1p1-3ubuntu1) ...
Also it will start automatically the ssh deamon process and would setup so that it would start the process everytime the server is booted. By default the firewall is off so as such the port 22 would be open else you have to enable port 22 in your firewall. You can use app like fire starter to manage your firewall.
How to test?
Once its done, you can login into the server using the ssh command at the prompt.
The ssh server validates against the local user credentials on the server. So if your user name is mvohra & IP address is 192.168.1.5 then
|mvohra@mvohra-desktop:~$ ssh firstname.lastname@example.org|
went prompted enter your password and you are in.