# Data Collection for Epiphany

{% hint style="warning" %}
This guide is under construction. Please excuse our dust.
{% endhint %}

## **Junos OS SSH Collection**

Epiphany also has the capability to extract network appliance information via Secure Shell (SSH). The SSH collectors will establish an SSHv2 session with the appliances and run the needed **show** commands for data collection.

{% hint style="warning" %}
If there are firewalls between the local Epiphany collector and a network appliance,  configure the firewall to allow SSH traffic from the collector to the network appliance.
{% endhint %}

#### Step 1: Provide the following data for each Juniper OS network appliance:

* [ ] IP Address
* [ ] Username/Password

- Generate a new user:

```
set system login user epiphany class read-only authentication encrypted-password <password>
```

{% hint style="danger" %}
This data is must be provided via in JSON format.
{% endhint %}

#### Example Data:

```json
{"ip":"192.168.0.1",
    "user":"username",
    "passw":"password123"},
{"ip":"192.168.0.2",
    "user":"username",
    "passw":"password123"}
```

#### Step 2:

* Upload the credentials via the process described in the [*Submission*](#submission) section in the *Juniper OS Manual Collection* section below.

## **Juniper OS Manual Collection**

If Ephiphany's collectors can't reach your assets via an API or SSH, data can be manually collected for the network modeling process. A command line interface (CLI) connection to the devices is needed, as well as a terminal emulator such as Putty or SecureCRT, capable of logging data presented via the **show** commands used.

#### Step 1:

* Authenticate to the device.
* Run the following commands:

```
show configuration | display json
show arp
show route
show vlans
show chassis hardware
show version
show lldp neighbors
```

### Submission

Once all data is collected from the JunOS dashboard, create a .zip file named **Collector\_Upload\_JunOS.zip** containing the data from JunOS.

To use secure copy protocol (SCP) to upload the file to the On-Premises Epiphany Collector, follow the steps below:

#### Step 2:

* Use a web browser to navigate to the Epiphany dashboard.
* Download PEM file to the local device. Once the PEM file is downloaded, it can be used to perform SCP of the compressed map folder to the Epiphany Collector.

#### Step 3:

Follow the steps below according to the operating system in use.

{% tabs %}
{% tab title="Linux" %}

* Send the file to the ‘upload’ user using the following commands:

```
scp -i ~/.ssh/key.pem <Collector_Upload> upload@<Collector_IP>:~/upload
```

{% hint style="warning" %}
The PEM file and map file can be anywhere on the file system, so provide that file’s pathway for the SCP command.
{% endhint %}
{% endtab %}

{% tab title="Windows 10" %}

* Enable OpenSSH Client on Windows 10 by going to **Settings** > **Apps and features** > **Optional Features.**
* Select **Add a feature**.
* Search for **OpenSSH Client**. If it is not already installed, install OpenSSH Client.
* Open a command prompt and use the following command:

```
scp -i ~/.ssh/key.pem < Collector_Upload> upload@<Collector_IP>:~/upload
```

{% hint style="warning" %}
The PEM file and map file can be anywhere on the file system, so provide that file’s pathway for the SCP command.
{% endhint %}
{% endtab %}
{% endtabs %}
