guardianproject / lildebi

UNMAINTAINED please adopt! we can no longer maintain this
https://guardianproject.info/code
GNU General Public License v3.0
226 stars 55 forks source link

cannot login via SSH error "stdin: is not a tty" #198

Closed ghost closed 8 years ago

ghost commented 8 years ago

ssh root@ip it asks for the password. I enter it. Then it gives the standard Debian welcome greeting "comes with no warranty etc". Then it says "stdin: is not a tty". The terminal is unresponsive after that.

ssh root@ip /bin/sh or ssh root@ip /bin/bash it asks for the password, then just gives a blinking cursor and is unresponsive.

ssh -t root@ip it asks for the password, then says PTY allocation request failed on channel 0

When using the Android Terminal Emulator, chrooted inside the debian install:

When I click the Start Debian button in Lil Debi it says start_debian.sh ... configuration that will be loaded then shows a whole bunch of mounts, then it shows SSH host keys, then it says Debian chroot mounted and started.

After start_debian.sh finishes

stty: standard input: Invalid argument
Using makefile-style concurrent boot in runlevel 2.
tcgetattr: Invalid Argument
Starting OpenBSD Secure Shell Server: sshd

Installation steps performed

Device and OS Android 4.4.4 Samsung Galaxy S3 GT-I9305 Kernel: 3.0.64 CM 11 2015 Jan

ghost commented 8 years ago

This is how I completely resolved this issue, and ALL other related issues on this device relating to terminals, stdin and pipes not working properly.

#edit /data/data/info.guardianproject.lildebi/app_bin/start-debian.sh
#if [ x"$install_on_internal_storage" = xyes ]; then
#    test_mount_bind /dev
#fi
test_mount_bind /dev
test_mount_bind /dev/cpuctl
test_mount_bind /dev/pts
test_mount_bind /dev/ptmx
[ ! -e $mnt/dev/stdin ] && ln -s /proc/self/fd/0 $mnt/dev/stdin

The above was just a 'quick' hack. I guess it should work inside the if structure. I'll test it some time and then maybe make a pull request.