Replies: 2 comments 1 reply
-
Sorry for the horrible formatting of the log messages..hopefully this one is clear
|
Beta Was this translation helpful? Give feedback.
-
My Config file
|
Beta Was this translation helpful? Give feedback.
-
Hi,
Is there way to disable public key authentication when using napalm based tasks? When I launch my script, it tries to perform public key based authentication in first 2 attempts and then tries the password I provided. I tried providing customer ssh config file using ssh.config_file which says the preferred method is password, it still does the public key authentication. I cannot run the task on multiple hosts without human intervention due to ssh-agent asking for authentication to access key files.
2022-11-09 12:28:43,013 task.py start line 98 DEBUG: Host 'rtrHost1': running task 'napalm_get' 2022-11-09 12:28:43,016 session.py __init__ line 56 DEBUG: [host None session 0x7fdd8007be80] <SSHSession(session, initial daemon)> created: client_capabilities=<dict_keyiterator object at 0x7fddc074dea0> 2022-11-09 12:28:43,383 transport.py _log line 1874 DEBUG: starting thread (client mode): 0xc0755490 2022-11-09 12:28:43,384 transport.py _log line 1874 DEBUG: Local version/idstring: SSH-2.0-paramiko_2.12.0 2022-11-09 12:28:43,767 transport.py _log line 1874 DEBUG: Remote version/idstring: SSH-2.0-OpenSSH_3.5p1 2022-11-09 12:28:43,767 transport.py _log line 1874 INFO: Connected (version 2.0, client OpenSSH_3.5p1) 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: === Key exchange possibilities === 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: kex algos: diffie-hellman-group16-sha512, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha1, diffie-hellman-group1-sha1 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: server key: ssh-rsa, ssh-dss 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: client encrypt: aes256-ctr, aes192-ctr, aes128-ctr, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, arcfour, aes192-cbc, aes256-cbc, [email protected] 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: server encrypt: aes256-ctr, aes192-ctr, aes128-ctr, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, arcfour, aes192-cbc, aes256-cbc, [email protected] 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: client mac: hmac-sha2-512, hmac-sha2-256, hmac-sha1, hmac-sha1-96, hmac-md5, hmac-ripemd160, [email protected], hmac-md5-96 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: server mac: hmac-sha2-512, hmac-sha2-256, hmac-sha1, hmac-sha1-96, hmac-md5, hmac-ripemd160, [email protected], hmac-md5-96 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: client compress: none 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: server compress: none 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: client lang: <none> 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: server lang: <none> 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: kex follows: False 2022-11-09 12:28:43,927 transport.py _log line 1874 DEBUG: === Key exchange agreements === 2022-11-09 12:28:43,928 transport.py _log line 1874 DEBUG: Kex: diffie-hellman-group16-sha512 2022-11-09 12:28:43,928 transport.py _log line 1874 DEBUG: HostKey: ssh-rsa 2022-11-09 12:28:43,928 transport.py _log line 1874 DEBUG: Cipher: aes128-ctr 2022-11-09 12:28:43,928 transport.py _log line 1874 DEBUG: MAC: hmac-sha2-256 2022-11-09 12:28:43,928 transport.py _log line 1874 DEBUG: Compression: none 2022-11-09 12:28:43,928 transport.py _log line 1874 DEBUG: === End of kex handshake === 2022-11-09 12:28:44,393 transport.py _log line 1874 DEBUG: kex engine KexGroup16SHA512 specified hash_algo <built-in function openssl_sha512> 2022-11-09 12:28:44,394 transport.py _log line 1874 DEBUG: Switch to new keys ... 2022-11-09 12:28:44,413 ssh.py _auth line 429 DEBUG: [host rtrHost1-mgmt.XYZ.com session 0x7fdd8007be80] Trying SSH agent key b'0bce3bb303847e39b1d74337330f8ab6' 2022-11-09 12:28:44,869 transport.py _log line 1874 DEBUG: userauth is OK 2022-11-09 12:28:47,645 transport.py _log line 1874 INFO: Authentication (publickey) failed. 2022-11-09 12:28:47,645 ssh.py _auth line 435 DEBUG: [host rtrHost1-mgmt.XYZ.com session 0x7fdd8007be80] Authentication failed. 2022-11-09 12:28:47,688 ssh.py _auth line 462 DEBUG: [host rtrHost1-mgmt.XYZ.com session 0x7fdd8007be80] Trying discovered key b'12f5827238fafdd02fd9086f84e49d3d' in /Users/nileshkhambal/.ssh/id_rsa 2022-11-09 12:28:48,014 transport.py _log line 1874 DEBUG: userauth is OK 2022-11-09 12:28:48,014 transport.py _log line 1874 DEBUG: Finalizing pubkey algorithm for key of type 'ssh-rsa' 2022-11-09 12:28:48,015 transport.py _log line 1874 DEBUG: Our pubkey algorithm list: ['rsa-sha2-512', 'rsa-sha2-256', 'ssh-rsa'] 2022-11-09 12:28:48,015 transport.py _log line 1874 DEBUG: Server did not send a server-sig-algs list; defaulting to our first preferred algo ('rsa-sha2-512') 2022-11-09 12:28:48,015 transport.py _log line 1874 DEBUG: NOTE: you may use the 'disabled_algorithms' SSHClient/Transport init kwarg to disable that or other algorithms if your server does not support them! 2022-11-09 12:28:48,176 transport.py _log line 1874 INFO: Authentication (publickey) failed. 2022-11-09 12:28:48,176 ssh.py _auth line 468 DEBUG: [host rtrHost1-mgmt.XYZ.com session 0x7fdd8007be80] Authentication failed. 2022-11-09 12:28:48,177 ssh.py _auth line 462 DEBUG: [host rtrHost1-mgmt.XYZ.com session 0x7fdd8007be80] Trying discovered key b'b1651120189195d287f90d76b4b59aed' in /Users/nileshkhambal/.ssh/id_dsa 2022-11-09 12:28:48,536 transport.py _log line 1874 DEBUG: userauth is OK 2022-11-09 12:28:48,694 transport.py _log line 1874 INFO: Authentication (publickey) failed. 2022-11-09 12:28:48,694 ssh.py _auth line 468 DEBUG: [host rtrHost1-mgmt.XYZ.com session 0x7fdd8007be80] Authentication failed. 2022-11-09 12:28:49,063 transport.py _log line 1874 DEBUG: userauth is OK 2022-11-09 12:28:50,111 transport.py _log line 1874 INFO: Authentication (password) successful!
Beta Was this translation helpful? Give feedback.
All reactions