In order to temporarily change the keyboard layout of an Ubuntu system, the following command from package kbd (aptitude install kbd) does the trick:
loadkeys {us|de|whatever suits you}
A permanent switch is done by reconfiguring console data:
dpkg-reconfigure console-data