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
Copy link

ghost commented Feb 24, 2017

Excellent

@gad26032
Copy link

Thanks!! Veeery much!

@xxorr23
Copy link

xxorr23 commented Jun 16, 2017

good job

@Aeres-u99
Copy link

Really saved a lot of time , thank you very much :)

@iurab
Copy link

iurab commented Jan 12, 2018

Any reason why service dropbear doesn't starts?
When calling service dropbear status the response is Usage: /etc/init.d/dropbear {start|stop|restart|force-reload} and not something like sshd is running.
Or is there a way to check a log?

@orinoco77
Copy link

Is it possible to write to external drives with this? I used to run an sshd server on my TV box with android 4.4.2, which was brilliant, but with 7.1 almost none of the sshd servers available work properly anymore, and those that do won't transfer more than 2gb. This could be a brilliant solution if that's possible.

@Tan-Tshunglee
Copy link

My default config option name is UsePrivilegeSeparation no.

@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