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.
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"
...
}
}
Is there any way to suppress banner on login?
Something like
-o LogLevel=erroror-qoption 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 -dcommand. And I no need to have banners in output.