The problem that I have seems much the same as from Feb 2019:
https://www.mail-archive.com/bug-bash@gnu.org/msg22665.html Try to login on a serial console, see the message: bash: initialize_job_control: no job control in background: Bad file descriptor This is what is running: # ps -ft tty2 UID PID PPID C STIME TTY TIME CMD root 18963 1 0 13:45 tty2 00:00:00 /bin/login -p -- addw 19149 18963 0 13:48 tty2 00:00:00 bash --login When I press any key I get logged out. This is what happens when I press the key: # strace -p 19149 strace: Process 19149 attached pselect6(1, [0], NULL, NULL, NULL, {[], 8}) = 1 (in [0]) read(0, 0x7ffc8237730f, 1) = -1 EIO (Input/output error) In my .bash_profile I have the following, something that has been there for years and caused no problem on my old desktop (CentOS 6, bash version 4.1.2(2)) I am now using bash 5.0.3(1)-release on a Debian-10 x86_64 machine. [[ -n $SHELL && -z $SSH_AGENT_PID && -z $DISPLAY ]] && exec -l ssh-agent $SHELL -c "bash --login" If I remove the above 2 lines the problem goes away but means that I do not have a ssh-agent. The 2 lines run, as expected, when I ssh localhost -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 https://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: https://www.phcomp.co.uk/Contact.html #include <std_disclaimer.h>