Connecting to server via SSH using Java - JSch and issuing shell commands
问题 I'm trying to write a program that connects via SSH to a remote Linux server using Java. I've found a number of examples online to do this using the JSch package, but they're mostly for issuing a single command to the server right after authentication. Is there any way, however, to first authenticate with the SSH server, then, over the connection, issue commands from the user input like you would via a remote shell? 回答1: If you want to implement an interactive shell, you need to use SSH