Skip to content

Instantly share code, notes, and snippets.

@kleo
Last active April 4, 2023 02:31
Show Gist options
  • Save kleo/ccaf34f4515670d84b37719c067300c7 to your computer and use it in GitHub Desktop.
Save kleo/ccaf34f4515670d84b37719c067300c7 to your computer and use it in GitHub Desktop.
GNURoot Debian Jessie Android SSH Server
# GNURoot Debian Jessie Android SSH Server
# Google Play Store: https://play.google.com/store/apps/details?id=com.gnuroot.debian
# Github: https://github.com/corbinlc/GNURootDebian
# change root password
passwd
apt update
apt install -y nano
# openssh-server
apt install -y openssh-server
nano /etc/ssh/sshd_config
Port 22 to 2222
UsePrivilegeSeperation no
PermitRootLogin yes
service ssh restart
# dropbear
apt install -y dropbear
nano /etc/default/dropbear DROPBEAR_PORT=22 to 2222
service dropbear restart
@gabrielrivas
Copy link

On Android > 5.0 this did not work for me. I had to actually not run openssh-server, and in
nano /etc/default/dropbear set NO_START=0 to actually start and use dropbear as the ssh server.

@nemozny
Copy link

nemozny commented Mar 13, 2018

@gabrielrivas is right, you should NOT run ssh service and run only dropbear.

@bulbuntu
Copy link

bulbuntu commented Apr 10, 2018

@gabrielrivas is right, atleast for me too!
If like me you are trying to connect from chrome shell and started both ssh & dropbear and you get the below annoying error after correcting the mistake...

 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
 Someone could be eavesdropping on you right now (man-in-the-middle attack)!
 It is also possible that a host key has just been changed.
 The fingerprint for the RSA key sent by the remote host is
 SHA256:MzFnNoqrVUK4L/234568ZQLcRQjB29zrY+n9TV24KlKrtc.
 Please contact your system administrator.
 Add correct host key in /.ssh/known_hosts to get rid of this message.
 Offending ECDSA key in /.ssh/known_hosts:1`

Then try the below in the ssh chrome-tab(Ctrl+Shift+J):
Note down the index at the end of /.ssh/known_hosts:<INDEX> and do
term_.command.removeKnownHostByIndex(<INDEX>);
As per the above I had to run
term_.command.removeKnownHostByIndex(1);

To forget all hosts try
term_.command.removeAllKnownHosts();

Cheers!
-bulbuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment