[ 
https://issues.apache.org/jira/browse/SSHD-1243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17484284#comment-17484284
 ] 

Guillaume Nodet commented on SSHD-1243:
---------------------------------------

The {{GitSshdSessionProcess}} won't help you as you'd have to create the ssh 
session and channel, it's just a thin wrapper.  You just need the  
{{ChannelExec}} which will allow you to run a remote command, so just call the 
correct method on the {{{}ClientSession{}}}:

  
[https://github.com/apache/mina-sshd/blob/da2958172281ef20e51681afe036bd42c9cf843a/sshd-core/src/main/java/org/apache/sshd/client/session/ClientSession.java#L182]

The reason why there's no abstraction is that you need to configure the SSH 
layer: host, port, user, password, ssh private key, host entries, ciphers, 
macs, etc...  So we probably won't provide such a thing.

And if you think you really need the {{GitSshdSessionProcess}} class, just copy 
it, rename it, and hack it to suit your needs.

Btw, you're saying you're migrating from {{Jsch}} but afaik, it does not 
provide this kind of abstraction (for the same reason I suppose).  However, it 
provides a {{ChannelExec}} in the same way as SSHD ...

> is GitSshdSessionProcess class Git specific? 
> ---------------------------------------------
>
>                 Key: SSHD-1243
>                 URL: https://issues.apache.org/jira/browse/SSHD-1243
>             Project: MINA SSHD
>          Issue Type: Question
>    Affects Versions: 2.8.0
>            Reporter: dgü
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> Hello!
> {{is org.apache.sshd.git.transport.GitSshdSessionProcess}} class Git specific 
> ?
> Is there a generic SSHD class extending java.lang.Process ?
> Thanks in advance!



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to