【发布时间】:2017-12-14 00:11:17
【问题描述】:
我正在开发一个简单的应用程序,它会自动 ssh 进入我的 iPhone 并运行一些命令。问题是 ssh 命令询问密码,我不确定如何编写 shell 文件,以便它自动输入该密码。我现在的代码如下所示:
ssh root@192.168.1.19
<here should be a code to type in the root password>
nimbus help
<some other commands>
Nimbus 是我通过 ssh 运行来远程控制手机的应用。
【问题讨论】:
-
你应该设置公钥认证。
标签: ios macos shell ssh passwords