问题
Since fabric is based on paramiko, is there any API to connect to virtual appliance with ssh-process having weird interactive shells ?
How can fabric interact with processes acting as such shells.
e.g. VM acting as switch having prompt 'switch-> ' when login is done over ssh. fabfile.py need to feed commands thereafter. once such command is to deploy images over tftpboots. The VM provides both telnet/ssh interface with user/password)
I tried below code, but it does not work -
@task
taskA():
with settings(prompts={'switch-> ' : 'bringkickstart img.bin' }):
run('save image')
来源:https://stackoverflow.com/questions/37402849/fabric-connect-to-machines-with-wierd-prompts