I'm trying to resolve an SSH connection issue on an Android phone running
SELinux in "Enforcing" mode. The problem is that any SSH connection that tries to allocate a pseudo-terminal (
/dev/pts etc) is denied permission, leaving my connection without a controlling tty. Practically this means that I loose the ability to use normal terminal control for editing, command history, CTRL characters etc.
Presumably this means that SELinux is preventing the SSH daemon from opening
I have no idea how to remedy this highly annoying situation, from within SSH server device (phone).
I'm running SSHelper on a non-priviledged port 2222 on a Samsung S4 using an SELinux Enforcing AOS 4.2.2 version. The weirdest thing is that I have root access using su under "Enforcing", but when I disable "Enforcing" and go to "Permissive", everything works in terminal, but I can no longer use su to gain root! (Simply no reaction and no error message.)
So there must be a way to control this under SELinux, but where and how?
Or is this a triviality and that I have only missed something?
For SSH connection in Enforcing mode, I use:
$ ssh -2 email@example.com -p 2222 SSHelper Version 6.3 Copyright 2014, P. Lutus firstname.lastname@example.org's password: PTY allocation request failed on channel 0 Linux 3.4.0-2340422 armv7l
This gets me a non tty shell with no prompt, severely limiting any editing possibilities.
PS. I have already tried with
ssh -t ..., no go.