I don't think there is such a timeout directly, but since the server presenting 
its key to the client for verification is part of the authentication protocol 
perhaps you could use the authentication timeout for this purpose. It's not 
exactly what you want, but it should do the job.


This is the easiest way - alternatively you could register a SessionListener 
and a ServerKeyVerifier with the SshClient. When the SessionListener notifies 
you that that the SSH session is established, start some internal timer on the 
session, and wait for the registered ServerKeyVerifier to tell you that the 
server key has been presented for validation on that session. If the timer 
expires before that happens you can forcefully close the session (or do 
whatever else you need to do...)


________________________________
From: Vikram Darsi <vda...@advaoptical.com>
Sent: Friday, July 13, 2018 7:05 PM
To: us...@mina.apache.org; dev@mina.apache.org
Subject: SSH server key is not presented to the client

Hi Team

New to Apache Mina & SSHD, Have a basic query

My application is acting as an SSH Client, and is there a timeout configuration 
or by any other means to know that the SSH server has/has not presented the 
server key to accept?
 Based on that, we wanted to take some action in the application


Thanks
Vikram

Reply via email to