This is necessary because otherwise the history is saved in different files when logged in via ssh and via tty.