Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

209
Vistas
How to get a server's host key using JavaScript in the browser?

Given the hostname of a server, I want to get its Host/Public key (stored in /etc/ssh/) using JavaScript in the browser.

I am aware that in the command line, we can get a host key using the ssh-keyscan utility. I want to do the same thing using JS (preferably vanilla JS).

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

A Node.js script could probably do it a few different ways.

  • it could execute the same ssh-keyscan command a human would use, via the built-in child_process module

You would capture the content of stdout and stderr as strings, and then parse those strings manually.

  • if the data you want can be read directly from a file, you could use the file module to read the file contents as a string, which you would then parse manually

Both of those will work using vanilla JS, and would not require that you install any third-party modules.

Note that Node might need special permissions. You might not encounter that difficulty running this on your local workstation, as yourself, but in a security-conscious environment it will probably require special steps.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda