[
https://issues.apache.org/jira/browse/SSHD-932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16885344#comment-16885344
]
Thomas Wolf commented on SSHD-932:
----------------------------------
See [the
documentation|https://github.com/apache/mina-sshd/blob/master/docs/sftp.md].
Basically, one you have a {{ClientSession}}, use
{{SftpClientFactory.instance().createSftpClient()}} to create an
{{SftpClient}}, then use the operations provided there. Note that you'll have
to handle the "current directory" on the _client_ side; likewise any other
state. You'll need the sshd-sftp bundle, too.
Unclear what your question (2) means. Do you mean connecting with an SSH
public/private key pair (like {{~/.ssh/id_rsa}})? Yes, you can.
> Mina client to connect remote Linux host and get few tasks done
> ---------------------------------------------------------------
>
> Key: SSHD-932
> URL: https://issues.apache.org/jira/browse/SSHD-932
> Project: MINA SSHD
> Issue Type: Question
> Affects Versions: 2.2.0
> Reporter: Zabee Ulla
> Priority: Major
>
> We are switching from Jsch to Apache MINA to connect and get a few tasks done
> from remote hosts.
> I need to achieve the following features,
> * List files of a remote host
> * Change directory of a remote host
> * Get file contents as bytes from a remote host
> * Put a file into the remote host
> I have the following questions,
> # How can I send a ZIP file to a remote host much easily in API level (not
> the Shell commands level)? And all other operations in API level.
> # Can I secure a connection between my localhost and remote through a
> certificate?
> # As of now, I am using SSHD-CORE and SSHD-COMMON version 2.2.0. Are these
> libraries enough or do I need to include any other libraries?
> # executeRemoteCommand() is stateless how can I maintain a state?
> Sorry, if the questions sound naive.
> Looking at this at an earlier opportunity will definitely help.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]