-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8ab0b12
Showing
7 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## Introduction | ||
|
||
适用于移动云手机的SSH,`SSH for Magisk_by ATRAY_v0.18.zip`。原版指路:https://gitlab.com/d4rcm4rc/MagiskSSH/,原版环境在移动云手机上并不起效,需要改动些才能用。 | ||
|
||
## Installation | ||
|
||
1. 管理员权限:`kauditd`。 | ||
2. 补全环境:`toybox_set_PATH.sh`。 | ||
3. 补全环境:`busybox_set_PATH.sh`。 | ||
4. 面具:`Magisk_27.0.apk`作者Enmmmmmm,选直接安装。 | ||
5. SSH模块:`SSH for Magisk_by ATRAY_v0.18.zip`。 | ||
|
||
## 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. | ||
1. 公钥`authorized_keys`放`/data/ssh/shell/.ssh/`与`/data/ssh/root/.ssh/`目录下。 | ||
|
||
2. 端口已改10002,配置文件:`/data/ssh/sshd_config`。 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/system/bin/sh | ||
|
||
check_and_link() { | ||
if ! command -v $1 >/dev/null 2>&1; then | ||
echo "$1 not found..." | ||
ln -s /system/xbin/busybox /system/xbin/$1 | ||
echo "done /system/xbin/$1" | ||
else | ||
echo "$1 found." | ||
fi | ||
} | ||
|
||
commands=("acpid" "adjtimex" "ar" "arch" "arp" "ascii" "ash" "awk" "base32" "base64" "basename" "bbconfig" "bc" "beep" "blkdiscard" "blkid" "blockdev" "bootchartd" "brctl" "bunzip2" "busybox" "bzcat" "bzip2" "cal" "cat" "chat" "chattr" "chgrp" "chown" "chpst" "chroot" "chrt" "chvt" "cksum" "clear" "cmp" "comm" "conspy" "cp" "cpio" "crc32" "crond" "crontab" "cryptpw" "cttyhack" "cut" "date" "dc" "dd" "deallocvt" "depmod" "devfsd" "devmem" "df" "dhcprelay" "diff" "dirname" "dmesg" "dnsd" "dnsdomainname" "dos2unix" "dpkg" "dpkg-deb" "du" "dumpkmap" "dumpleases" "echo" "ed" "egrep" "eject" "env" "envdir" "envuidgid" "ether-wake" "expand" "expr" "factor" "fakeidentd" "fallocate" "false" "fatattr" "fbset" "fbsplash" "fdflush" "fdformat" "fdisk" "fgconsole" "fgrep" "find" "findfs" "flock" "fold" "free" "freeramdisk" "fsck" "fsck.minix" "fsfreeze" "fstrim" "fsync" "ftpd" "ftpget" "ftpput" "fuser" "getopt" "getty" "grep" "groups" "gunzip" "gzip" "halt" "hd" "hdparm" "head" "hexdump" "hexedit" "hostname" "httpd" "hush" "hwclock" "i2cdetect" "i2cdump" "i2cget" "i2cset" "i2ctransfer" "id" "ifconfig" "ifdown" "ifenslave" "ifplugd" "ifup" "inetd" "init" "inotifyd" "insmod" "install" "ionice" "iostat" "ip" "ipaddr" "ipcalc" "iplink" "ipneigh" "iproute" "iprule" "iptunnel" "kbd_mode" "kill" "killall" "killall5" "klogd" "less" "link" "linux32" "linux64" "linuxrc" "ln" "loadkmap" "logger" "logname" "losetup" "lpd" "lpq" "lpr" "ls" "lsattr" "lsmod" "lsof" "lspci" "lsscsi" "lsusb" "lzcat" "lzma" "lzop" "lzopcat" "makedevs" "makemime" "man" "md5sum" "mesg" "microcom" "mim" "mkdir" "mkdosfs" "mke2fs" "mkfifo" "mkfs.ext2" "mkfs.minix" "mkfs.reiser" "mkfs.vfat" "mknod" "mkpasswd" "mkswap" "mktemp" "modinfo" "modprobe" "more" "mount" "mountpoint" "mpstat" "mt" "mv" "nameif" "nbd-client" "nc" "netstat" "nice" "nl" "nmeter" "nohup" "nologin" "nproc" "nsenter" "nslookup" "ntpd" "nuke" "od" "openvt" "partprobe" "paste" "patch" "pgrep" "pidof" "ping" "ping6" "pipe_progress" "pivot_root" "pkill" "pmap" "popmaildir" "poweroff" "powertop" "printenv" "printf" "ps" "pscan" "pstree" "pwd" "pwdx" "raidautorun" "rdate" "rdev" "readlink" "readprofile" "realpath" "reboot" "reformime" "renice" "reset" "resize" "resume" "rev" "rfkill" "rm" "rmdir" "rmmod" "route" "rpm" "rpm2cpio" "rtcwake" "run-init" "run-parts" "runsv" "runsvdir" "rx" "script" "scriptreplay" "sed" "sendmail" "seq" "setarch" "setconsole" "setfattr" "setkeycodes" "setlogcons" "setpriv" "setserial" "setsid" "setuidgid" "sha1sum" "sha256sum" "sha3sum" "sha512sum" "showkey" "shred" "shuf" "slattach" "sleep" "smemcap" "softlimit" "sort" "split" "start-stop-daemon" "stat" "strings" "stty" "sum" "sv" "svc" "svlogd" "svok" "swapoff" "swapon" "switch_root" "sync" "sysctl" "tac" "tail" "tar" "taskset" "tc" "tcpsvd" "tee" "telnet" "telnetd" "test" "tftp" "tftpd" "time" "timeout" "top" "touch" "tr" "traceroute" "traceroute6" "true" "truncate" "ts" "tty" "ttysize" "tunctl" "tune2fs" "ubiattach" "ubidetach" "ubimkvol" "ubirmvol" "ubirsvol" "ubiupdatevol" "udhcpc" "udhcpd" "udpsvd" "uevent" "umount" "uname" "uncompress" "unexpand" "uniq" "unix2dos" "unlink" "unlzma" "unlzop" "unshare" "unxz" "unzip" "uptime" "usleep" "uudecode" "uuencode" "vconfig" "vi" "volname" "watch" "watchdog" "wc" "wget" "which" "whoami" "whois" "xargs" "xxd" "xz" "xzcat" "yes" "zcat" "zcip") | ||
|
||
mkdir /system/xbin | ||
cp ./busybox /system/xbin/busybox | ||
cp ./ssl_helper /system/xbin/ssl_helper | ||
chmod 777 /system/xbin/busybox | ||
chmod 777 /system/xbin/ssl_helper | ||
for cmd in "${commands[@]}"; do | ||
check_and_link $cmd | ||
done |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/system/bin/sh | ||
|
||
check_and_link() { | ||
if ! command -v $1 >/dev/null 2>&1; then | ||
echo "$1 not found..." | ||
ln -s /system/bin/toybox /system/xbin/$1 | ||
echo "done /system/xbin/$1" | ||
else | ||
echo "$1 found." | ||
fi | ||
} | ||
|
||
commands=("acpi" "appctrl" "base64" "basename" "blkid" "blockdev" "cal" "cat" "chattr" "chcon" "chgrp" "chmod" "chown" "chroot" "chrt" "cksum" "clear" "cmp" "comm" "cp" "cpio" "cut" "date" "dd" "df" "diff" "dirname" "dmesg" "dos2unix" "du" "echo" "egrep" "env" "expand" "expr" "fallocate" "false" "fgrep" "file" "find" "flock" "fmt" "free" "freeramdisk" "fsfreeze" "getenforce" "getfattr" "grep" "groups" "gunzip" "gzip" "head" "help" "hostname" "hwclock" "id" "ifconfig" "inotifyd" "insmod" "install" "ionice" "iorenice" "iotop" "kill" "killall" "ln" "load_policy" "log" "logname" "losetup" "ls" "lsattr" "lsmod" "lsof" "lspci" "lsusb" "makedevs" "md5sum" "microcom" "mkdir" "mkfifo" "mknod" "mkswap" "mktemp" "modinfo" "modprobe" "more" "mount" "mountpoint" "mv" "nbd-client" "nc" "netcat" "netstat" "nice" "nl" "nohup" "od" "partprobe" "paste" "patch" "pgrep" "pidof" "pivot_root" "pkill" "pmap" "printenv" "printf" "ps" "pwd" "pwdx" "readlink" "realpath" "renice" "restorecon" "rev" "rfkill" "rm" "rmdir" "rmmod" "runcon" "sed" "sendevent" "seq" "setenforce" "setfattr" "setprop" "setsid" "sha1sum" "sha224sum" "sha256sum" "sha384sum" "sha512sum" "sleep" "sort" "split" "start" "stat" "stop" "strings" "stty" "swapoff" "swapon" "sync" "sysctl" "tac" "tail" "tar" "taskset" "tee" "time" "timeout" "top" "touch" "tr" "traceroute" "traceroute6" "true" "truncate" "tty" "tunctl" "ulimit" "umount" "uname" "uniq" "unix2dos" "uptime" "usleep" "uudecode" "uuencode" "vconfig" "vmstat" "wc" "which" "whoami" "xargs" "xxd" "yes" "zcat") | ||
|
||
mkdir /system/xbin | ||
for cmd in "${commands[@]}"; do | ||
check_and_link $cmd | ||
done |