How do I temporary change my keyboard layout on Debian? (no X)
Try:
# loadkeys us
From a terminal, it does not make sense to run this over ssh as the keyboard you use over ssh is the local one and the ssh client sends the keys after they have already been interpreted according to your local keymap. And it won't even work if you try.
You can find all the available console keymaps in /usr/share/kbd/keymaps
.
You mean you want to change the keyboard layout of the console of the machine from which you are launching the terminal; and do it before launching ssh connection; and have that modified keyboard layout have a special key to switch between to modes "us" and "german"?
Well, by default there isn't any such setting; those layout switching are usually done between latin/non-latin layouts.
You could however take one of those existing settings (for example, the console layout definition for, say, Greek keyboard), copy it under another name, edit it and change the Greek letter definitions with whatever applies for your wanted "German" layout. Then load that modified layout; and now you can switch between them.
If, on the other hand, you just want to change the layout for the duration of the whole ssh session; just call loadkeys us
before launching ssh session, as totaam said; and loadkeys de
after it.