using paramiko's
exec_command()
, send command, process output , several other commands. notice it's not quick enough or that.
how handle scenario , providing multiple commands together
(there 1 post on stackoverflow
issuing multiple commands not sure if has tried it. didn't work me!
thanks!
here's tried: have ssh_obj
:
t = ssh_obj.get_transport() chan = t.open_session() chan.exec_command("bash -s") #to shell without terminal, command prompt, login, etc chan.send_ready() #output: true chan.send("net use x: \"\\\\xxx.xx.xx.xx\\dir\"") #output: 33 (not sure is) chan.recv_ready() #output: false (not sure why) chan.recv(1024) #hangs...
can help?
Comments
Post a Comment