title: Get public key from SSH server
body: <p>I have been looking for this for a long time.</p>
  <p>I need to extract and get the modulus and the exponent from an SSH server.</p>
  <p>For example, I know, that SSH is running on server xxx.xxx.xxx.xxx (I can connect to this server / ping) but I don't know the user name and the password so I cannot log in.</p>
  <p>I need to get the modulus and the exponent of the public RSA key of this server.</p>
  <p>I found out, that <code>ssh-keyscan</code> 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 the modulus and the exponent from the output.</p>
  <p>Is it possible?</p>