Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excessive WARN messages #60

Open
mherb63 opened this issue Feb 22, 2017 · 4 comments
Open

Excessive WARN messages #60

mherb63 opened this issue Feb 22, 2017 · 4 comments

Comments

@mherb63
Copy link

mherb63 commented Feb 22, 2017

We are using this to send a bunch of commands to a Network Interface device. For every exec() command we get one of these WARN

15:34:59.554 [http-bio-8080-exec-7] WARN  com.jcabi.ssh.SSH - Permanently added '10.24.10.38' (RSA) to the list of known hosts.

here's how we're using the tool:

  Shell shell = new SSHByPassword("10.24.10.38", 22, "user", "password");
  for (commandList: command) {
    String output = new Shell.Plain(shell).exec(cmd);
  }

Is there something wrong with the way we are using this tool? Why are you trying to permanently add the IP address on each exec() I would assume that is done once when we new SSHByPassword

@0crat
Copy link

0crat commented Feb 22, 2017

@yegor256 please, pay attention to this issue

@mherb63
Copy link
Author

mherb63 commented Feb 22, 2017

Well it seems like the ChannelExec is re-established for each exec() we invoke. Is there any way you could provide a way to keep the channel open? Once we are done sending our exec()s we could close the channel ourselves.

@yegor256
Copy link
Member

@mherb63 it's not possible in current design. Each exec() works with its own connection/session. This is how it is designed. If you need something more fine-grained, use jSch directly.

@yegor256
Copy link
Member

yegor256 commented Jun 19, 2017

@mherb63 also, you can get rid of that warning through ssh configuration file: https://stackoverflow.com/a/19733924/187141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants