This is how I set mine.
Adding a hostname:
hostname server.name.name.com (I'm also running dyndns (hense the name.name.com))
If you want to securely connect to your machine from a remote computer.
I use putty from a remote windows computer and slogin from my Ubuntu box using ssh.
I also use dyndns as my domain (name.name.com) so my server is "server.name.name.com".
I can log into my server with (command line) slogin email@example.com to log in as a selected user. From putty, I login to name.name.com using ssh port 22.