-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
Description of Issue/Question
Under host can we define custom ssh_config_file file
Setup
Using a sample host config to validate physical-interface status change
config_check.yml
hosts:
- device: core01.device01
username: username
tests:
- test_no_diff.yml
test_no_diff.yml
- command: show interfaces terse lo*
- iterate:
xpath: physical-interface
id: './name'
tests:
- no-diff: oper-status # element in which test is performed
err: "Test Failed!! oper-status got changed, before it was <{{pre['oper-status']}}>, now it is <{{post['oper-status']}}>"
info: "Test Passed!! oper-status is same, before it is <{{pre['oper-status']}}> now it is <{{post['oper-status']}}>"
Steps to Reproduce Issue
jsnapy --snap pre -f config_check.yml
Traceback (most recent call last):
File "/Users/fakrul/.pyenv/versions/3.9.0/lib/python3.9/threading.py", line 950, in _bootstrap_inner
self.run()
File "/Users/fakrul/.pyenv/versions/3.9.0/lib/python3.9/threading.py", line 888, in run
self._target(*self._args, **self._kwargs)
File "/Users/fakrul/.pyenv/versions/3.9.0/lib/python3.9/site-packages/jnpr/jsnapy/jsnapy.py", line 694, in connect
raise Exception(ex)
Exception: ConnectError(host: core01.device01, msg: Negotiation failed: Error reading SSH protocol banner)
Error in log:
# tail -f /var/log/jsnapy/jsnapy.log
ERROR occurred ConnectError(host: core01.device01, msg: Negotiation failed: Error reading SSH protocol banner)
2024-02-26 15:41:52,848 - jnpr.jsnapy.jsnapy - DEBUG -
jsnapy.cfg file location used : /etc/jsnapy
2024-02-26 15:41:52,849 - jnpr.jsnapy.jsnapy - DEBUG -
Configuration file location used : /etc/jsnapy
2024-02-26 15:41:52,852 - jnpr.jsnapy.jsnapy - INFO -
Connecting to device core01. device01 ................
2024-02-26 15:42:08,544 - jnpr.jsnapy.jsnapy - ERROR -
ERROR occurred ConnectError(host: core01.device01, msg: Negotiation failed: Error reading SSH protocol banner)
Versions Report
JSNAPy version: 1.3.7
Python 3.9.0