SSH authentication

Hello everyone, i’m tring to do an authenticated scan with SSH credential on a Lubuntu machine. My problem is that i can’t login, but user and pass are correct, i’ve uploaded in credential ssh_host_rsa_key from /etc/ssh directory. What am i wrong with? Obviously i can connect via ssh by terminal without problems

Hi beppelucertole,

I think it would be a good idea to check the logs on both sides:

  • Scanner. You can check on the web frontend in the tab “Error Messages” of the corresponding report to see any errors that occured during the scan. Maybe you can find more information there. The logs located at /var/log/gvm may prove helpful too.

  • Target Host. Most Linux systems generate an authentication log located at /var/log. Usually it’s named something like auth.log. If the information there is not detailed enough, you may increase the log level to gain more insight.

Hi, thank you, in error messages there are nothing. Let me search in log files and i can tell you if i’ve resolved

When it ask me private key, i have to import private key of scanner or of target?

You need to import the private key of the user on the target host you want to run the authenticated scan as.

So i have to create a key with ssh-keygen right? Then i have to send this private key to the target host, where do i import? Which directory? If i have to put in adirectory… .Can you explain me, thanks a lot

I recommend that you check out a tutorial on how to generate and manage SSH keys.

You need to generate a ssh keypair for the user on the target host you want to run the authenticated scan as, and then add the public key as authorized SSH key for that user. Then, you can upload the private key for that user via the web frontend. Make sure to enter the correct username and password for the key (if applicable).

Thank you very much. What user do you mean here “Then, you can upload the private key for that user via the web frontend” target or scanner?
Really thanks a lot

I was referring to the user on the target host you want to run the authenticated scan as.

Ok, i’ve downloaded from openVAS browser frontend a deb file after created wrong credential. Once i’ll do correct sequence of actions have i download it and run on target machine an other time?

You should only have to run it once on the target machine if you don’t plan on changing the credentials or user that’s used for scanning.

Ok thanks a lot

A post was split to a new topic: Authenticated scan, 0% for two hours