Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSH Key authentication method #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion napalm_sros/sros.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@
class NokiaSROSDriver(NetworkDriver):
"""Napalm driver for Skeleton."""

def __init__(self, hostname, username, password, timeout=60, optional_args=None):
def __init__(self, hostname, username, password, key_filename, timeout=60, optional_args=None):
"""Constructor."""
self.manager = None
self.hostname = hostname
self.username = username
self.password = password
self.key_filename = key_filename
self.timeout = timeout
self.conn = None
self.conn_ssh = None
Expand Down Expand Up @@ -94,6 +95,7 @@ def open(self):
port=self.port,
username=self.username,
password=self.password,
key_filename=self.key_filename,
hostkey_verify=False,
timeout=self.timeout,
)
Expand Down