mwiede / jsch

fork of the popular jsch library
Other
670 stars 124 forks source link

Example JSch as terminal access #215

Closed ThraaxSession closed 1 year ago

ThraaxSession commented 1 year ago

I already use JSCH with success to execute shell commands and sftp to upload files. But for additional I want to provide a "terminal" in my web application with a real prompt. Do you have any example how I can use JSCH for this? I want to solve this with a websocket which is listening and doing the callback to JSCH.

Here is my SSH code: https://github.com/SpaceUp-Cloud/SpaceUp-Server/blob/master/src/main/kotlin/technology/iatlas/spaceup/services/SshService.kt

norrisjeremy commented 1 year ago

Hi @ThraaxSession,

It sounds like you would want to create a shell channel. See https://github.com/mwiede/jsch/blob/master/examples/Shell.java.

Thanks, Jeremy

ThraaxSession commented 1 year ago

Thank you! Yes, I would like to create a shell. I'll take the swing example!