I have new brand new Dell with Ubuntu 16.04.02 LTS pre-installed. I've done updates, setup a local account and installed ssh.
When I try to ssh into the machine it asks for my password, prints "Welcome to Ubuntu", "last login: Thu..." and then "Connection closed".
This happens from remote systems, or locally when I run
The problem is just login sessions, it works if I give it a command like
ssh 127.0.0.1 /bin/date
I can even get a minimally working shell but it isn't attached to a tty so lots of things don't work.
ssh 127.0.0.1 /bin/bash -i
The account uses bash. The startup scripts are unchanged from the ones in /etc/skel, just .bashrc and .profile. I've tried moving them aside. Based on an old answer I have verified that they don't have an exit in them.
I'm using a normal user account; not root.