---
title: Connecting to Target Device with IP address for SSH Proxy
slug: kronpam-reference-guide-3-9-0/connecting-to-target-device-with-ip-address-for-ssh-proxy
docTags: 
createdAt: 2024-11-28T11:49:04.820Z
---

This feature ensures that the inventory remains up-to-date in multi-device environments and facilitates user access to the correct device groups. By defining subnets for device groups, system administrators can optimize the device discovery and group management processes, allowing users to access the correct devices based on their IP address and protocol information. This approach automates the process of rediscovering and reassigning devices to the appropriate groups, even in cases of dynamic IP changes, ensuring that the inventory stays current.

To enable this feature, the **aioc.device.connect.with.ip** and **netright.discovery.moduleVisibility&#x20;**&#x66;unctions must be added to the Realm Definition in Portal Functions.

Also, to use this feature, follow these steps:

1. Open **Devices > Inventory > Device Groups > Subnet > Add Subnet** configurations.

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/GxWTgU69t3JPxkVK9QtRW_image.png "Subnet Configurations ")

- Open **Devices > Discovery > Add.**
- Add a Discovery Profile with **Save without Scheduling** (the Possible Element Type field should include the types of devices for SSH connections).
- These parameters should be defined based on the number of different element types of devices within the subnet.&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/2qraMyS_oeGDWw466tk-l_image.png" size="88" width="714" height="748" position="center" caption="Discovery Profile" darkWidth="714" darkHeight="748" showCaption="true"}

Example parameter values are as follows:

1. Open **Element Types > Select Related Element Type > Association Tags >&#x20;**&#x41;d&#x64;**&#x20;Auto Discovery**
2. Open **Element Types > Select Related Element Type > Custom Properties > Add These Parameters**:
   - Example values of these parameters:&#x20;
     - Hostname Command = hostname
     - Hostname Matcher Regex = .\*
     - Version Command = cat /etc/os-release
     - Version Matcher Regex = .\*(CentOS|Red|Ubuntu).\*

::Image[]{src="https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/pMTIzCn0Qe0xfLnh1lu0O_image.png" size="74" width="949" height="520" position="center" caption="Auto Discovery Parameters and Example Values " darkWidth="949" darkHeight="520" showCaption="true"}

1. Click the **Connect to** **Target Device** Button.
2. Fill in the IP address / Domain Name.&#x20;
3. Choose SSHv2 as the Access Protocol and **Connect**.

With this feature, when connecting to a device, the behavior is determined based on the properties of the device realm and the device group to which the subnet belongs.

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/GPSeELDVtfgvBGZrqam7r_image.png "Connect to Target Device ")

If the user enters a domain name in the IP address/Domain name field on the screen, Kron PAM will connect to the relevant device by finding the IP address corresponding to the domain name in the /etc/hosts file. If the domain name is not defined in the hosts file, Kron PAM will connect by finding the relevant IP value from the DNS server.

![](https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/VQVNU6K60U0wcx4YwEn8C_image.png)

