Python Paramiko send CTRL+C to an ssh shell
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm invoking a shell using Paramiko in order to use a CLI over an ssh connection. The problem with this CLI is if I do not close it specifically using CTRL+C, the program will not be able to be opened again without rebooting my system. I've tried the below commands: SSH.send("^C\n") SSH.send("\x003") is there another way to call these? Again, I've established an SSH connection using paramiko.SSHClient() and then invoked a shell using ssh.invoke_shell() and now i need to send CTRL+C to that shell to close the shell (not the ssh connection)