首页 \ 问答 \ 自动化从mac到iPhone的ssh(Automate ssh from mac to iPhone)

自动化从mac到iPhone的ssh(Automate ssh from mac to iPhone)

我正在开发一个iOS工具,它基于shell脚本,将各种东西推送到设备,然后根据设备上推送的内容执行各种操作。

在这种情况下,该设备将成为一个越狱的iPhone。 我想从mac连接到它..所以,我使用“usbmux”ssh over usb并且它工作得很好。 (干杯:D)

现在,问题是,我想完全自动化ssh-ing过程,假设密码是默认的'alpine'。 避免用户互动。

这就是我所尝试过的,并没有给我预期的结果。

expect <<< 'spawn ssh root@localhost -p 2222; expect "*?password:*"; send "alpine\r";'

我读到了ssh-keygen和其他一些选项,但它们似乎需要初始的手动交互。 请帮我完全自动化。


I am working on a tool for iOS, it's based on shell scripts that push various stuff to the device and then performs various operations based on what's pushed on the device.

In this case the device is going to be a jailbroken iPhone. And I would like to connect to it from mac.. so, I have used "usbmux" to ssh over usb and it works great. (cheers :D)

Now, the problem is, i would like to completely automate the ssh-ing process, assuming the password is the default 'alpine'. To avoid user interaction.

This is what i have tried and it doesn't give me the expected outcome.

expect <<< 'spawn ssh root@localhost -p 2222; expect "*?password:*"; send "alpine\r";'

I read about ssh-keygen and few other options but they seem to require initial manual interactions. Please help me completely automate this.


原文:
更新时间:2022-11-11 06:11

最满意答案

我建议你重新组织你的数据,从两个“RowNumber”和“WorkPlaceCodeName”返回一个组合字段,例如组合字段中的示例“RowNumber”+ separator +“WorkPlaceCodeName”组,并使用groupingView中的formatDisplayField显示“WorkPlaceCodeName”。


I suggest you to reorganize your data to return one combined field from the two "RowNumber" and "WorkPlaceCodeName" like by example "RowNumber"+separator+ "WorkPlaceCodeName" group by that combined field and use formatDisplayField in groupingView to display "WorkPlaceCodeName".

相关问答

更多
  • 您可以覆盖提供的css文件,尝试使用F12并检查要应用的css文件名。 并且您可以使用自己的css文件和类覆盖它们 You can override css files provided, try to use F12 and check the css file name which is getting applied. and you can override this css file and classes with your own
  • 我在每个案件后忘了休息陈述。 onGroupClickListener没有任何功能上的错误; 这是一个简单的编码错误,但它可以作为匆忙编码的一个很好的例子。 I forgot break statements after each case. There was nothing functionally wrong with onGroupClickListener; it was a simple coding mistake, but it can serve as a good example of ...
  • 你编写了一些简单的错误,但是你的主要问题是你的代码是用来添加简单的行而不是树节点。 您可以进入官方演示页面,并在“3.4版新增”中选择演示“树形网格邻接模型”。 我编写的演示程序与从演示演示页面演示演示完全一样,但只使用本地数据 : 在你的情况下,你必须使用属性level parent , isLeaf expanded mydata的对象: var mydata = [ {id:"1",Name:"Main Menu",MenuId:"1",MenuName:"Menu1", level ...
  • 您真正需要的是jqgrid能够在您需要使用TinyMCE编辑的textarea或div上设置自己的自定义类或ID。 此外,tinyMCE的init代码设置为与此示例中相同的类名: http : //www.tinymce.com/tryit/basic.php 在该配置中,tinyMCE设置为加载所有textareas,但您可以将其更改为任何CSS选择器,例如“.myClassName”或“#myTextarea”。 All you really need is for jqgrid to be able ...
  • 你的问题并不新鲜。 很多时候,在trirand论坛或者stackoverflow上都会询问相应的功能请求。 前一段时间,我对这个密切的问题给出了另一个答案 。 现在阅读完您的问题后,我决定不做出支持所有jqGrid功能的完美解决方案 (这一点太难了)。 而不是我决定创建一个可以在许多情况下使用的解决方案,但有一些限制。 演示显示了我的第一个结果: 限制: 网格的列不能调整大小。 我在演示cmTemplate: {resizable: false}参数中使用以在所有网格列中设置resizable: false ...
  • 如果你实际上只是提出一个你将在以后删除的view , 那么最好为您的view创建一个ViewController类,并使用以下方式以模态方式呈现它: [self presentViewController:yourViewControllerObject animated:NO completion:nil]; 您可以稍后使用以下命令删除此view : [self dismissViewControllerAnimated:NO completion:nil]; 希望这可以帮助 ! Thanks to ...
  • 对的,这是可能的。 我不确定您使用的是哪种服务器端语言,但使用网络套接字或signalR,如果数据已在服务器上刷新,您可以向所有打开的页面发送消息以进行刷新。 你也可以使用轮询来实现这一点。 概念是这样的: 您从第1页的网格或任何地方更新数据,然后传送到服务器。 现在您要刷新可能包含此数据的页面或打算显示它。 轮询:在所有此类页面上,如果从轮询中获得更改,则从服务器刷新数据 SignalR:您可以使用集线器向所有客户端发送方法,以运行检查网格存在的javascript代码,然后刷新它。 还有其他方法,当有人 ...
  • 添加选项groupColumnShow:[false]到groupingView之类 groupingView : { groupField : ['name'], groupColumnShow : [false] }, add option groupColumnShow : [false] to the groupingView like groupingView : { groupField : ['name'], groupColumnShow : [false] },
  • 您应该在getGroupView中使用持有者。 我建议你为回收商添加一个支架。 @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { View v = convertView; ExpandListGroup group = (ExpandListGroup) getGroup(groupPo ...
  • 我建议你重新组织你的数据,从两个“RowNumber”和“WorkPlaceCodeName”返回一个组合字段,例如组合字段中的示例“RowNumber”+ separator +“WorkPlaceCodeName”组,并使用groupingView中的formatDisplayField显示“WorkPlaceCodeName”。 I suggest you to reorganize your data to return one combined field from the two "RowNum ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)