You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something like -o LogLevel=error or -q option for OpenSSH Client.
I'm trying to parse command output from some remote hosts and sometimes there is unexpected banners.
For example, I want to check OS version on remote host by lsb_release -d command. And I no need to have banners in output.
import com.decodified.scalassh.SSH
import com.decodified.scalassh.HostConfig
val hostname: String = ???
val hostConfig: HostConfig = ???
SSH(hostname, hostConfig) { client =>
client.exec("lsb_release -d").map { res: CommandResult =>
val errStr = res.stdErrAsString().trim
val outStr = res.stdOutAsString().trim // I have banner in outStr, but I don't want it. Expected only output of "lsb_release"
...
}
}
The text was updated successfully, but these errors were encountered:
AFAIK there is currently no facility for this.
But you could check/ask the upstream dependency, which should be replace with https://github.com/mwiede/jsch anyway (see #59). If there is something there that allows for banner suppression it should be easy to provide here.
Is there any way to suppress banner on login?
Something like
-o LogLevel=error
or-q
option for OpenSSH Client.I'm trying to parse command output from some remote hosts and sometimes there is unexpected banners.
For example, I want to check OS version on remote host by
lsb_release -d
command. And I no need to have banners in output.The text was updated successfully, but these errors were encountered: