• Stars
    star
    175
  • Rank 218,059 (Top 5 %)
  • Language
    Shell
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ssh

MagiskSSH

This is an SSH server running as root using the great Magisk systemless root suite. It includes binaries for arm, arm64, x86, x86_64. However, only arm64 has been tested at all. It requires Android API version 24 or higher (Android 7.0 Nougat and higher).

Included software

Installation

Download the zip file and install it via the Magisk Manager app. Once this module is available in the Magisk module repository, you can just install it from there.

Configuration

SSH keys can be put into /data/ssh/root/.ssh/authorized_keys and /data/ssh/shell/.ssh/authorized_keys using your favorite method of editing files. Note that this file must be owned by the respective user and should have 600 permissions (owner: rw, everyone else: nothing).

The sshd configuration file in /data/ssh/sshd_config can be edited as well, but please be aware that some features usually present in an OpenSSH installation may be missing. Most importantly, password login is not possible using this package.

The ssh daemon automatically starts on device boot. If this is undesired, you can create a file /data/ssh/no-autostart. It will not start the service then.

Usage

Once you have written a valid SSH public key into an authorized_keys file (see section 'Configuration' above), you can connect to the device using ssh shell@<device_ip> (unprivileged access) or ssh root@<device_ip> (privileged access), while supplying the correct private key. You will drop into a shell on the device. sftp and rsync should work as usual.

If you want to manually start/stop the sshd-service, you may do so using /data/adb/modules/ssh/opensshd.init start and /data/adb/modules/ssh/opensshd.init stop. This is usually not necessary but may be useful if you use the no-autostart file described earlier. Note that the opensshd.init script may be in a different place on your device. Magisk explicitly does not give any guarantees about the install location and is free to change it.

Uninstallation

Uninstalling the module via the Magisk Manager should also delete the /data/ssh directory. This contains the host keys for the SSH server and the home directories for the SSH users. Thus, uninstalling via the Manager should get rid of all traces of this module.

If you wish to keep the runtime data for a later reinstallation of the module, create a file /data/ssh/KEEP_ON_UNINSTALL and the uninstaller will skip this step.

Contributing

Please don't file Pull Requests against the module repository. The module building is an automated process and will overwrite any changes to the files in the module repository. Feel free to create a Merge Request against the source repository, instead.

License

GPL v3

Links

Source Code Repository

Changelog

2023-07029, v0.16
  • Adress CVE-2023-38408, even though we don't ship the affected agent.
  • Version bump.
  • OpenSSH 9.3p2
2023-03-26, v0.15
  • Version bump.
  • OpenSSL 3.1.0
  • OpenSSH 9.3p1
  • Rsync 3.2.7
  • Drop mips and mips64 support
  • Build using NDK r25c, simplify building and updating a bit
  • Shrink package (strip binaries, use stronger compression)
  • Add updateJson mechanism for updating on Magisk v24 and later (thanks tamas646)
2022-02-19, v0.14
  • Add uninstaller script (see section 'Uninstallation') (thanks cl-ement05 and osm0sis)
  • Use user handles instead of names for credits (thanks osm0sis)
  • Ensure correct home directory permissions on install (thanks nazar-pc)
  • Put temp files into /data/local/tmp instead of /tmp (thanks F-i-f)
2022-02-19, v0.13
  • Version bump.
  • OpenSSL 3.0.1
  • OpenSSH 8.8p1
  • Magisk installer v24.1
2021-04-30, v0.12
  • Version bump.
  • OpenSSL 1.1.1k
  • OpenSSH 8.6p1
  • Rsync 3.2.3
  • Magisk installer v22.1
  • Fix build repository's commit hash bleeding into rsync --version
  • Properly set library path for rsync (thanks adorkablue)
2020-07-18, v0.11
  • Version bump.
  • OpenSSL 1.1.1g
  • OpenSSH 8.3p1
  • Rsync 3.2.2
  • Magisk installer v20.4
2019-11-26, v0.10
  • Version bump.
  • OpenSSL 1.0.2t
  • OpenSSH 8.1p1
  • Magisk installer v20.1
2019-04-06, v0.9
  • Remove downloading Magisk template, directly include the installer structure instead
2019-03-23, v0.8
  • Bugfix.
  • Correctly apply permissions to bin/raw files
2019-03-16, v0.7
  • Bugfixes.
  • Avoid hardcoding MODDIR in opensshd.init
  • Use wrapper script for setting LD_LIBRARY_PATH instead of setting it in init script
2019-03-10, v0.6
  • Version bump.
  • OpenSSL 1.0.2r
2018-11-04, v0.5
  • Version bumps (except rsync).
  • Set owner and permissions for shell directory
  • OpenSSL 1.0.2p
  • OpenSSH 7.9p1
  • Magisk Module Template v17000
2018-07-16, v0.4
  • Derive paths from $MODDIR instead of hardcoding /magisk
2018-04-06, v0.3
  • Version bumps.
  • Fix sftp rename on filesystems without hardlinks (ie. FAT32)
  • OpenSSL 1.0.2o
  • OpenSSH 7.7p1
  • Rsync 3.1.3
  • Magisk Module Template v1500
2017-11-23, v0.2
  • Version bumps.
  • OpenSSL 1.0.2m
  • OpenSSH 7.6p1
  • Rsync 3.1.2
  • Magisk Module Template v1400
2017-10-03, v0.1
  • Initial release.
  • OpenSSL 1.0.2l
  • OpenSSH 7.5p1
  • Rsync 3.1.2
  • Magisk Module Template v1400

More Repositories

1

MagiskHidePropsConf

This tool is now dead...
Shell
1,979
star
2

busybox-ndk

busybox-ndk
Shell
892
star
3

movecert

movecert
Shell
663
star
4

wifi-bonding

Double your bandwith on your Qualcomm devices.
Shell
582
star
5

submission

Submit your Magisk Modules!
559
star
6

HideNavBar

Shell
498
star
7

adb-ndk

adb-ndk
Shell
457
star
8

ViPER4Android-FX

Shell
404
star
9

G-VisualMod

Systemlessy customize your Android's Visual
Shell
393
star
10

v2ray

v2ray core
Shell
331
star
11

callrecorder-skvalex

callrecorder-skvalex
Shell
326
star
12

energizedprotection

Energized Protection Magisk Module.
Shell
321
star
13

terminal_systemizer

terminal_systemizer
Shell
317
star
14

acc

Upstream repo:
Shell
317
star
15

KaliNethunter

KaliNethunter
Shell
298
star
16

Detach

Detach
Shell
249
star
17

com.piyushgarg.rclone

Shell
247
star
18

terminal_debloater

terminal_debloater
Shell
229
star
19

OneController

Magisk module which adds proper key mapping for various game controllers.
Shell
209
star
20

riru_lsposed

Shell
203
star
21

twrp-keep

twrp-keep
Shell
195
star
22

xmlpak

Shell
175
star
23

mm

mm
Shell
157
star
24

riru-core

Shell
148
star
25

Fdroid-Priv

Fdroid-Priv
Shell
128
star
26

nano-ndk

nano-ndk
Shell
127
star
27

xposed

Shell
126
star
28

ainur_narsil

Sauron audiomod developed with many experimental tweaks to squeeze more from your device in terms of sound
Shell
124
star
29

CloudflareDNS4Magisk

CloudflareDNS4Magisk
Shell
120
star
30

Pix3lify

Pix3lify
Shell
115
star
31

ccbins

Shell
109
star
32

liboemcryptodisabler

liboemcryptodisabler
Shell
109
star
33

acp

acp
Shell
98
star
34

ainur_jamesdsp

ainur_jamesdsp
Shell
81
star
35

riru_edxposed

Shell
77
star
36

IPControl

IPControl
Shell
74
star
37

adreno-dev

adreno-dev
Shell
72
star
38

ARCore_enabler

Shell
72
star
39

callrecorder-axet

Magisk module for installing axet's Call Recorder app
Shell
71
star
40

microG_installer

Go here ->
Shell
70
star
41

zipsigner

zipsigner
Shell
69
star
42

benchkit

A developer-centric toolkit module for Android to facilitate in-depth profiling and benchmarking.
Shell
67
star
43

GoogleDialerFramework

GoogleDialerFramework
Shell
65
star
44

riru_storage_redirect

Storage Isolation (Storage Redirect) is an app which provides isolated storage feature for apps. It can prevent poor-designed apps making your storage messy and let you control files app can access.
Shell
61
star
45

magisk-drm-disabler

Read-only mirror from GitLab. A Magisk module designed to disable DRM completely on Android
Shell
60
star
46

magisk-frida

You are probably looking for: https://github.com/ViRb3/magisk-frida
55
star
47

mtd-ndk

mtd-ndk
Shell
53
star
48

terminalmods

terminalmods
Shell
52
star
49

aml

aml
Shell
51
star
50

ExSDCard

ExSDCard
Shell
49
star
51

active_edge_system_mod

Active Edge Mod for Pixel devices
Shell
48
star
52

NfcScreenOff

Read NFC tags when screen is off. Disable NFC tagging sound.
Shell
47
star
53

CloudflareDNS4Magisk-IPv6

CloudflareDNS4Magisk-IPv6
Shell
45
star
54

wirelessFirmware

wirelessFirmware
Shell
44
star
55

djs

Daily Job Scheduler
Shell
43
star
56

BluetoothLibraryPatcher

Shell
43
star
57

hidden_settings

Shell
38
star
58

quickstepswitcher

Shell
36
star
59

WDAnimationcxair

Boot and Shut animation switcher Magisk Module for any supported android device
Shell
32
star
60

twrp-helper

A Magisk module to provide dynamic, in-situ patching of a device's TWRP recovery image to include Internal Storage in Data back-ups.
Shell
31
star
61

ViPER4AndroidFX-Legacy

ViPER4AndroidFX Legacy
Shell
31
star
62

Oxy-ify

Oxy-ify
Shell
30
star
63

airmusic

airaudio
Shell
30
star
64

noneDisplayCutout

Shell
29
star
65

nexusmedia

nexusmedia
Shell
26
star
66

sony-device-dummy

sony-device-dummy
Shell
25
star
67

overlayfix

Shell
23
star
68

vold-posix

vold-posix
Shell
23
star
69

foxy-boot

Shell
22
star
70

miracast-enabler

Magisk module to re-enable Mircast on certain android devices
Shell
22
star
71

Systemless_TZData

Systemless_TZData
Shell
21
star
72

PIXELARITY

Contains pixel exclusives, fix and tweaks to boost user experience on devices running Android 9/10
Shell
20
star
73

sqlite3

sqlite3
Shell
20
star
74

adreno-630-gpu-driver

Original repo at:
Shell
19
star
75

HEVCEnabler

HEVCEnabler
Shell
16
star
76

riru_location_report_enabler

A module of Riru. Enable Google location report and Google app timeline by hook __system_property_get in specific packages.
Shell
13
star
77

libsecure_storage

This Magisk module contains modified libsecure_storage.so libraries that allow rooted Samsung to function without losing Bluetooth pairings after a reboot.
Shell
13
star
78

disable-screenshot-camera-sounds

disable-screenshot-camera-sounds
Shell
13
star
79

com.catchingnow.icebox

Shell
12
star
80

wifi5ghzdisabler

Magisk module to disable WiFi 5Ghz Band on your Qualcomm device
Shell
11
star
81

apt-x

apt-x
Shell
10
star
82

ctenabler

Shell
9
star
83

disable-mdnsd

Shell
9
star
84

zsh_arm64

Shell
9
star
85

sonymusic

Shell
8
star
86

tcpdump_static_aarch64

Shell
8
star
87

oosbar

Shell
8
star
88

AppOpsPlugin

Shell
8
star
89

ASUS-Style-Suite

ASUS-Style-Suite
Shell
7
star
90

OneUISounds

One UI system sounds
Shell
7
star
91

logcat

Shell
7
star
92

aospill

Shell
7
star
93

motoclockwidget

motoclockwidget
Shell
7
star
94

xposed_dalvik

Shell
7
star
95

miui-10-sounds

Shell
6
star
96

ViPER4AndroidXHiFi

ViPER4AndroidXHiFi
Shell
6
star
97

HideGesBar

Shell
4
star
98

PS4RE

Shell
4
star
99

kfmark

Shell
2
star