What is the difference between exec_command and send with invoke_shell() on Paramiko?

The difference is that invoke_shell uses SSH shell channel, while exec_command uses SSH exec channel. What that really means to you as a user/developer really depends on the SSH server, not on Paramiko itself. In common *nix OpenSSH server: The shell channel executes a login shell (as if you login with SSH terminal client). The … Read more

Providing input/subcommands to command executed over SSH with JSch

Calling ChannelExec.setCommand multiple times has no effect. And even if it had, I’d guess that the 192.168.50.1 : and Config.txt are not commands, but inputs to the copy run tftp : command, aren’t they? If that’s the case, you need to write them to the command input. Something like this: ChannelExec channel = (ChannelExec) session.openChannel(“exec”); … Read more