Linux discovery and SSH Public / Private Keys

lmundere
Kilo Sage

Hi,

I am currently setting up the Linux Discovery, and we have opted to use the SSH Private Key, and I have received the pair, (both private and public key), I understand that I will add the private key in the SSH private Key within the credentials in ServiceNow and my question is where to put the Public Key? I am going to use a MID Server hosted on a Windows Server.

1 ACCEPTED SOLUTION

VivekSattanatha
Mega Sage

Hi,

 

The public key must be configured on the each target system which you will be discovering., your Linux administrator will help you place the public keys on the target devices. From Servicenow you need to add the private key only. If your linux administrator didnt place the public key on the target devices then the private key which you added on the servicenow instance wont work so before discovering just check with your linux admins whether the public keys are there in the target devices.

 

 

Regards,

Vivek

View solution in original post

8 REPLIES 8

VivekSattanatha
Mega Sage

Hi,

 

The public key must be configured on the each target system which you will be discovering., your Linux administrator will help you place the public keys on the target devices. From Servicenow you need to add the private key only. If your linux administrator didnt place the public key on the target devices then the private key which you added on the servicenow instance wont work so before discovering just check with your linux admins whether the public keys are there in the target devices.

 

 

Regards,

Vivek

Hi @VivekSattanatha 

 

Do we require password? If we have private and public key setup

Not really. Some times you would need passphrase which decrypts the private key. But it is not mandatory, the person who created the public and private key if he gave that option to encrypt the private key with passphrase then only you would need else it is not required.

anilkumarya
Kilo Contributor

 

When discussing Linux discovery and SSH public/private keys, the focus is usually on secure access and system visibility.

Linux Discovery:
In practical terms, discovery means identifying active hosts, open ports, and running services on a Linux system. Tools like nmap, ss, or netstat are commonly used to understand what’s exposed on the network. This is important for both system administration and security auditing.

SSH Public/Private Key Authentication:
SSH uses a key pair instead of passwords for secure login:

  • Private Key → kept securely on your local machine (never share it)
  • Public Key → added to the server (~/.ssh/authorized_keys)

Basic setup:

 

 
ssh-keygen -t rsa -b 4096
ssh-copy-id user@server_ip
 

 

 

After this, you can log in without a password:

 

 
ssh user@server_ip
 

Why use SSH keys?

  • More secure than password-based login
  • Protects against brute-force attacks
  • Essential for automation (deployments, scripts, CI/CD)

In production environments, it’s also a good practice to disable password authentication once SSH keys are configured.

Many modern hosting platforms support this out of the box. For example, providers like YouStable offer full root access and SSH-enabled environments, which makes it easy to implement secure key-based authentication from the start.