Setting up an SSH Server on Ubuntu 12.04 (Precise Pangolin) is very easy.
Open a terminal, and type:
sudo apt-get install openssh-server
After it has installed you can connect to your machine.
Configuration of the port
If you want to change the configuration, then you have to edit the file /etc/ssh/sshd_config.
To open the file with gedit:
sudo gedit /etc/ssh/sshd_config
Obviously you can find the port number on the port line. Save the file and restart the SSH daemon so your new changes will become active.
Restart the SSH server:
sudo restart ssh