越狱

必备插件

ios11上不可用viewDebug

SSH

通过openSSH连接(登录)手机
//ssh 用户名@用户服务器地址
$ ssh root@192.168.31.178
//退出
$ exit
//删除SSH服务器对应的公钥
$ ssh-keygen -R 服务器IP地址
iOS下有两个用户
修改ssh登录密码
SSH使用公钥登录
//生成公私钥
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/qionglinfu/.ssh/id_rsa):
/Users/qionglinfu/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/qionglinfu/.ssh/id_rsa.
Your public key has been saved in /Users/qionglinfu/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:9XIlN1AjWwcqmZo/lVlj0Dp5uMWeejkKLstiBbJkF6s qionglinfu@bogon
The key's randomart image is:
+---[RSA 2048]----+
|            +o=..|
|      .    o B.o |
|       o  = +=B  |
|    + +  + o=O+o |
|   o = .S . ** . |
|    E   .. +. o  |
|       .  +  . . |
|      o... o. +  |
|     . .oo. .o . |
+----[SHA256]-----+

$ ls
id_rsa//私钥
id_rsa.pub//公钥      
known_hosts     
known_hosts.old

//把公钥拷贝到服务器
$ ssh-copy-id root@172.17.10.121
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/qionglinfu/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@172.17.10.121's password:

Number of key(s) added:        1

Now try logging into the machine, with:   "ssh 'root@172.17.10.121'"
and check to make sure that only the key(s) you wanted were added.

//再次登陆,无需密码
$ ssh root@172.17.10.121

//查看服务器公钥
$ cd ~/.ssh
$ ls
authorized_keys
$ cat authorized_keys

//or查看公钥
$ cd /etc/ssh/
$ cat ssh_host_rsa_key.pub		
USB
//设置转发端口$ python tcprelay.py -t 22:12345
Forwarding local port 12345 to remote port 22
//另开窗口,使用新端口登陆
ssh -p 12345 root@127.0.0.1
The authenticity of host '[127.0.0.1]:12345 ([127.0.0.1]:12345)' can't be established.
RSA key fingerprint is SHA256:pX3wqp3yEaLUk4S4lUJftC34FufQrx47Gc2e6Sm2t0U.
//IP更换重新认证
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:12345' (RSA) to the list of known hosts.
kumani:~ root#
脚本实现快速登陆
文件拷贝
//通过Wi-Fi拷贝
$ touch 1.txt
$ scp 1.txt root@172.17.10.118:~/
1.txt                                         100%    0     0.0KB/s   00:00
//通过USB拷贝
$ scp -P 12345 1.txt root@localhost:~/
1.txt                                         100%    0     0.0KB/s   00:00
应用瘦身
lipo WeChat -thin arm64 -output arm64_WeChat