Skip to content

Unable to notify remote exec command of an EOF of the stdin #143

@tsingakbar

Description

@tsingakbar

I'm trying to use sshj to implement something like cat foo.tar.gz | ssh user@remote tar xzf -, and I used the Command.getOutputStream() to feed these bytes from a local file named foo.tar.gz, but when all bytes is fed, I can't find a way to shutdown the process gracefully.
Invoking the close() method on the stream won't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions