Changing keyboard layout to Dvorak in Ubuntu-server

I found this more straightforward and simple:

sudo dpkg-reconfigure keyboard-configuration

This will guide you through the process of selecting different keyboard layouts:

$ dpkg-reconfigure console-data

Maybe you will need to install console-data.

$ sudo apt-get install console-data

If you want to make changes permanent then you can use:

$ dpkg-reconfigure console-setup

Looks like this will work, too:

$ sudo loadkeys dvorak

Hat tip to http://ma.tt/2004/01/dvorak-on-linux-console/