A server console with the wrong keyboard layout is a special kind of annoying, because the characters you need for a password are the ones that moved. localectl can fix that without editing files by hand.
localectl list-keymaps
sudo localectl set-keymap us
The first command lists the keymaps available for the console. The second sets the system keyboard mapping. Per the localectl man page, unless you pass --no-convert, the choice is also applied as the default X11 mapping. So one command covers both the text console and a graphical session that reads the system default.
It works the other way around too. localectl set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]] sets the X11 default and, again unless you pass --no-convert, applies it to the virtual console as well.
sudo localectl --no-convert set-keymap us
That version changes only the console and leaves the X11 default alone. I’d use it when the two should differ, for example a machine where the console is used rarely and the desktop layout was set up on purpose.
To see what is set right now, run localectl status. It shows the current system locale and keyboard mapping.
Two caveats. The man page says localectl talks to systemd-localed, which writes files such as /etc/locale.conf and /etc/vconsole.conf, so this is a system-wide setting and not a per-user one. This tip follows the documentation and was not run against a live system.
Further reading: localectl(1) man page
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more