Python面料:如何处理任意的远程shell提示输入? [英] Python Fabric: How to handle arbitrary remote shell prompt for input?

查看:151
本文介绍了Python面料:如何处理任意的远程shell提示输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这与此问题有关,但与轻微的扭曲:而不是传递是或否,我需要Fabric将任意字符串传递到远程shell。



例如,如果远程shell提示你叫什么名字,那么我需要先把它'喂''。

澄清:我知道我说任意输入,但我是真的尝试使用它作为SSH密钥passwd提示,当我尝试做git拉



更新#1:获得Jeff Forcier @bitprophet的回复




解决方案

终端支持与远程服务器的交互在织物1.0。有关详细信息,请参见此页面


This is related to this question here, but with a slight twist: instead of just passing 'yes' or 'no', I need Fabric to pass an arbitrary string to the remote shell.

For instance, if the remote shell prompts for 'what is your name?' then I need to feed it 'first,last'.

Clarification: I know I said arbitrary input, but I was really trying to use it for the SSH key passwd prompt when I try to do a git pull.

Update #1: Got a response from Jeff Forcier @bitprophet

解决方案

Interaction with remote servers is finally supported in Fabric 1.0. See this page for details.

这篇关于Python面料:如何处理任意的远程shell提示输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆