Hi Jochen,

So, it's the increase of the session timeout.

The ssh authentication timeout (on the server side) is the default:

private int authTimeout = 10 * 60 * 1000; // 10 minutes in milliseconds
authTimeout = getIntProperty(ServerFactoryManager.AUTH_TIMEOUT, authTimeout);

It could make sense to set it configurable, but anyway, it's not 120000ms right now.

So, I guess that you want to increase the client disconnect timeout. Do you use OpenSSH or bin/client ?

Regards
JB

On 10/21/2015 07:16 AM, jochenw wrote:
Hi,

with Karaf 4.0.1, the host key lenght has been increased from 1024 to 4096
bit. When you try to connect to a fresh Karaf installation for the first
time on a low-profile target via ssh, the generation of the host.key file
can take longer than the authentication timeout, resulting in following
error message:

Session has timed out waiting for authentication after 120000 ms.

This can be a blocker if you try to set up Karaf in an automated way,
issuing ssh commands from a script (e.g. calling the wrapper command to make
Karaf a service). One remedy would be to set the key length to a lower
value, e.g. 2048, in the org.apache.karaf.shell.cfg file, which reduces the
time for key generation. 4096 looks bit paranoid anyways, but you never know
these days ;-).

My question: instead of reducing the key size, or having some two-step
approach to create the key first (e.g. issuing some dummy ssh command from
the script and then wait long enough to have the key generated), is there a
way to set the ssh authentication timeout to a higher value than 120000 ms?

Best Regards,
Jochen



--
View this message in context: 
http://karaf.922171.n3.nabble.com/How-to-set-the-ssh-authentication-timeout-tp4043163.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to