自动化从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.
原文:
最满意答案
我建议你重新组织你的数据,从两个“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
-
无论选择哪个groupView,都只显示一个片段。(No matter which groupView is selected, only one fragment is shown.)[2023-09-28]
我在每个案件后忘了休息陈述。 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 ... -
Jqgrid树视图Adjacencey(Jqgrid Tree View Adjacencey)[2023-05-12]
你编写了一些简单的错误,但是你的主要问题是你的代码是用来添加简单的行而不是树节点。 您可以进入官方演示页面,并在“3.4版新增”中选择演示“树形网格邻接模型”。 我编写的演示程序与从演示演示页面演示演示完全一样,但只使用本地数据 : 在你的情况下,你必须使用属性level parent , isLeaf expanded mydata的对象: var mydata = [ {id:"1",Name:"Main Menu",MenuId:"1",MenuName:"Menu1", level ... -
穿上jqgrid(tinymce into jqgrid)[2024-02-20]
您真正需要的是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 ... -
jqGrid列组(jqGrid Column Group)[2023-09-08]
你的问题并不新鲜。 很多时候,在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] },
-
如何从ExpandableListView中打开的groupView获取字符串?(How to get string from opened groupView in ExpandableListView?)[2022-03-15]
您应该在getGroupView中使用持有者。 我建议你为回收商添加一个支架。 @Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { View v = convertView; ExpandListGroup group = (ExpandListGroup) getGroup(groupPo ... -
JQGrid组视图(JQGrid groupView)[2024-04-26]
我建议你重新组织你的数据,从两个“RowNumber”和“WorkPlaceCodeName”返回一个组合字段,例如组合字段中的示例“RowNumber”+ separator +“WorkPlaceCodeName”组,并使用groupingView中的formatDisplayField显示“WorkPlaceCodeName”。 I suggest you to reorganize your data to return one combined field from the two "RowNum ...