Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-1064

Mutliple commands in one session do not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5.1
    • 2.6.0
    • None

    Description

      I tried to do this:

      SshClient.setUpDefaultSimpleClient().use { ssh ->
         ssh.sessionLogin("server.company.com", "user", "p@ssw0rd").use { session ->
            println(session.executeRemoteCommand("id"))
            println(session.executeRemoteCommand("ps aux"))
         }
      }
      

      (If you are not familiar with the syntax, it is Kotlin. The use works like a try-with-resources, I think the rest should be pretty obvious)

      This is supposed to work, isn't it?
      Yet it does not work.
      The first command works fine and then for the second command I get java.rmi.RemoteException: No exit status returned for command=ps aux.

      Attachments

        Activity

          People

            lgoldstein Lyor Goldstein
            vampire Björn Kautler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: