Activating ssh server is a must for your ubuntu box. This howto shows the installation and setup for the openssh client and server, while you are running Ubuntu 13.10 Saucy Salamander.

First of all update your system (note, this could take a long time)

develop@develop:~$ $ sudo apt-get update

Install the client:

develop@develop:~$ sudo apt-get install openssh-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssh-client is already the newest version.

My client was already installed and updated. 8)

Saucy-Salamander

Now install the server:

develop@develop:~$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libck-connector0 ncurses-term python-requests python-urllib3 ssh-import-id
Suggested packages:
  rssh molly-guard monkeysphere openssh-blacklist openssh-blacklist-extra
The following NEW packages will be installed:
  libck-connector0 ncurses-term openssh-server python-requests python-urllib3 ssh-import-id
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 786 kB of archives.
After this operation, 3524 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://it.archive.ubuntu.com/ubuntu/ saucy/main libck-connector0 i386 0.4.5-3.1ubuntu2 [10,1 kB]
Get:2 http://it.archive.ubuntu.com/ubuntu/ saucy/main ncurses-term all 5.9+20130608-1ubuntu1 [427 kB]
Get:3 http://it.archive.ubuntu.com/ubuntu/ saucy-updates/main openssh-server i386 1:6.2p2-6ubuntu0.1 [259 kB]
Get:4 http://it.archive.ubuntu.com/ubuntu/ saucy/main python-urllib3 all 1.6-2 [35,0 kB]                                     
Get:5 http://it.archive.ubuntu.com/ubuntu/ saucy/main python-requests all 1.2.3-1 [44,3 kB]                                  
Get:6 http://it.archive.ubuntu.com/ubuntu/ saucy/main ssh-import-id all 3.19-0ubuntu1 [10,3 kB]                              
Fetched 786 kB in 6s (121 kB/s)                                                                                              
Selecting previously unselected package libck-connector0:i386.
(Reading database ... 198663 files and directories currently installed.)
Unpacking libck-connector0:i386 (from .../libck-connector0_0.4.5-3.1ubuntu2_i386.deb) ...
Selecting previously unselected package ncurses-term.
Unpacking ncurses-term (from .../ncurses-term_5.9+20130608-1ubuntu1_all.deb) ...
Selecting previously unselected package openssh-server.
Unpacking openssh-server (from .../openssh-server_1%3a6.2p2-6ubuntu0.1_i386.deb) ...
Selecting previously unselected package python-urllib3.
Unpacking python-urllib3 (from .../python-urllib3_1.6-2_all.deb) ...
Selecting previously unselected package python-requests.
Unpacking python-requests (from .../python-requests_1.2.3-1_all.deb) ...
Selecting previously unselected package ssh-import-id.
Unpacking ssh-import-id (from .../ssh-import-id_3.19-0ubuntu1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw ...
Setting up libck-connector0:i386 (0.4.5-3.1ubuntu2) ...
Setting up ncurses-term (5.9+20130608-1ubuntu1) ...
Setting up openssh-server (1:6.2p2-6ubuntu0.1) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
ssh start/running, process 5860
Setting up python-urllib3 (1.6-2) ...
Setting up python-requests (1.2.3-1) ...
Setting up ssh-import-id (3.19-0ubuntu1) ...
Processing triggers for libc-bin ...
Processing triggers for ureadahead ...
Processing triggers for ufw ...
develop@develop:~$


Setting up
Edit (as sudo) /etc/ssh/sshd_config, search for line (Port 22) and change 22 in a number greater than 2048, this will secure your system just a little. When you'll try to connect to your ubuntu box using ssh client you shall specify the number of port you have selected.

# What ports, IPs and protocols we listen for
Port 2233

now let's restart the server

 

develop@develop:~$ sudo service ssh restart
ssh stop/waiting
ssh start/running, process 6265

 

Let's give a try:

develop@develop:~$ ssh -l develop localhost
ssh: connect to host localhost port 22: Connection refused

I activated the server on a different port, as I shown obove. So let's give another try:

develop@develop:~$ ssh -l develop localhost -p 2233
The authenticity of host '[localhost]:2233 ([127.0.0.1]:2233)' can't be established.
ECDSA key fingerprint is 02:db:84:38:67:fa:f0:54:d1:be:5b:4f:de:fe:b0:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[localhost]:2233' (ECDSA) to the list of known hosts.
develop@localhost's password:

So the server is working
See you soon,

Gg1