When I installed mysecureshell to setup sftp for my Ubuntu 16.04 server, it decided to do a lot of other things like…disable ssh access.
I don’t know why they don’t tell you this in screaming caps to begin with.
But a quick look at the Shell directive (http://mysecureshell.readthedocs.io/en/latest/tags/childs/shell.html) reveals that indeed if you install mysecureshell, it will turn it off by default.
I’m not necessarily opposed to that as a practice but they should make that really obvious as it took me quite some time to figure out what it was that made mysecureshell turn it off in the first place.
I installed mysecureshell via apt-get and configure sftp but then suddenly I got:
$ ssh user@server Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-59-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage 22 packages can be updated. 0 updates are security updates. Last login: Thu Feb 2 01:27:02 2017 from 10.10.10.10 Shell access is disabled !Connection to server closed.
What gives? I didn’t change SSH access…I added SFTP. Or did I? So yes, installing mysecureshell will in fact disable SSH access by default.
Adding the directive
to the <Default> parent tag will re-enable ssh access.