napalm-automation-community / napalm-dellos10

NAPALM Driver for Dell EMC OS10 Enterprise
http://dellos10-napalm.readthedocs.io/en/latest/
Apache License 2.0
10 stars 11 forks source link

OS10 is ignoring "username xxx sshkey ..." statements #25

Open tmshlvck opened 4 years ago

tmshlvck commented 4 years ago

I tried to automate SSH key distribution over Napalm with this driver. If I get it right driver uploads the generated configuration to the switch over SCP and then executes copy home://merge_config.txt running-configuration .

The problem I encountered is that when I have this statement in the merge_config.txt file:

itchy# show file home merge_config.txt
username ansible sshkey "ssh-rsa xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx== tmshlvck@gmail.com"

I can execute the copy and it succeeds but the key is not added into running configuration:

itchy# copy home://merge_config.txt running-configuration
Copy completed
itchy# show running-configuration | grep ansible
username ansible password
$6$rounds=656000$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx role sysadmin priv-lvl 15
itchy#

Is there any reason for not installing the key over copy file running-configuration? I guess this is a bug in OS10, right?

Is there any workaround to achieve SSH key installation into the config?

tmshlvck commented 4 years ago

Btw. I tried it with this OS10 version:

itchy# show version 
Dell EMC Networking OS10 Enterprise
Copyright (c) 1999-2020 by Dell Inc. All Rights Reserved.
OS Version: 10.5.1.3
Build Version: 10.5.1.3.190
Build Time: 2020-06-19T21:48:07+0000
System Type: S5248F-ON
Architecture: x86_64
Up Time: 1 day 11:28:12