Skip to content

shell-session echos what I send? #40

Open
@nicferrier

Description

@nicferrier

I don't want it to echo what I send.. I've got something like:

(ssh/with-connection nic-sesh
        (let [ch (doto (ssh/shell-channel nic-sesh)
                   (.setPty true))
              in (.getInputStream ch)
              out (.getOutputStream ch)]
          (ssh/with-channel-connection ch
            (thread  
              (loop [char (.read in)] ; from ssh to stdout
                (if (= -1 char)
                  (System/exit 1)
                  (do
                    (.write *out* char)
                    (.flush *out*)
                    (recur (.read in))))))
            (loop [char (.read *in*)] ; from stdin to ssh
              (if-not (= -1 char)
                (do
                  (.write out char)
                  (.flush out)
                  (recur (.read *in*))))))))

it seems weird that I'd get an echo. Anyone have an explanation?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions