Get public key from SSH server : <p>I'm looking for this for a long time.</p>

<p>I need to extract and get modulus and exponent from SSH server.</p>

<p>For example, I know, that on server xxx.xxx.xxx.xxx is running ssh (I can connect to this server / ping) but I dont know user name and password so cannot log in.</p>

<p>I need to get modulus and exponent of public RSA key of this server.</p>

<p>I found, that ssh-keyscan can get modulus + exponent (from documentation) but only if ssh-rsa1 is used. If I try to get ssh-rsa(2) public key with ssh-keyscan, I cannot retrieve from output modulus and exponent.</p>

<p>Is it possible ? </p>
