OpenSSH

OpenSSH会在iOS上安装SSH服务,以给外界提供一个通过ssh接入iOS的途径。

这里用的最多的一般只有2个命令:ssh和scp,前者用于远程登录,后者用于远程拷贝文件。

ssh用法:ssh user@iOSIP

示例:Mac远程连接iphone

wifi:~ clf$ ssh root@192.168.2.2
The authenticity of host '192.168.2.2 (192.168.2.2)' can't be established.
ECDSA key fingerprint is SHA256:o2jgbSUKqlEYdg+5xzJsOvY63ZnxhcOCeRxZo9Ibw/Y.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.2' (ECDSA) to the list of known hosts.
root@192.168.2.2's password: 
iPhone:~ root# 

scp用法:

1)把文件从本地拷贝到iOS上

scp localFilePath user@iOSIP:romoteFilePath

2)把文件从iOS拷贝到本地

scp user@iOSIP:romoteFilePath localFilePath

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容