10-09-2024 09:28 AM
I am working to get pyATs working for my network. I have a test Cisco device which I can ping as well as ssh into using PuTTy and linux server terminal. I cannot on the other hand ssh into actual devices on the network using the linux server, I can access them through PuTTy. Although I am not sure if this is what I should do when trying to ssh using command prompt I get this error:
Unable to negotiate with {ip address} port {}: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
The problem is when running my testbed file for the actual network, authentication is done using AD whereas my test device just uses the local credentials. It does not connect to the network devices, I am unsure if it is an ssh problem or something else.
10-09-2024 09:50 AM
@vandongc7749 try and allow the SSH client to use the insecure key exchange methods offered by the network devices, you can add the following lines to your SSH client configuration file (~/.ssh/config
or /etc/ssh/ssh_config
)
Host *
KexAlgorithms +diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
This will add the specified key exchange methods to the list of allowed algorithms for all hosts.
Hope this helps.
10-09-2024 10:27 AM
How do I access the ssh file?
10-09-2024 11:29 AM
@vandongc7749 you can use vim or nano.
Hope this helps.
10-09-2024 12:18 PM
@bigevilbeard I am unable to write to the file because it is read-only and I probably don't have the right permissions to change it. Am I stuck or is there something else I could try
10-10-2024 02:22 AM
@vandongc7749 i think so, can create a user-specific SSH configuration file that will override the system settings. This file is usually located at ~/.ssh/config
- note the tilde ~
symbol, which represents your user's home directory.
Hope this helps.
10-15-2024 07:29 AM
Still having authentication issues. From command prompt I am able to now ssh into my test devices by adding:
HostKeyAlgorithms +ssh-rsa
to the config file. I also was able to figure out the actual user name for the network device. I am able to get to the part where I enter my password but there is a tacacs error which says:
Tacacs authentication failed
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide