#1
|
|||
|
|||
SSH host keys
Is there any way to auto accept new host keys.
I have created a script that will connect to a device, in this case a cisco switch, via ssh2. The script will login the username/pass combo I give it at the beginning. Will verify the connection, run x commands, then close the connection, log the results and move on to the next switch in my list. The script works perfectly. I do however, have an issue with host keys on the switch end. Not long ago all the switches I am running this script on, were telnet based. I have since converted everything over to ssh2 with tacacs+. So at this point, I have yet to connect and cache all the host keys. I have to run this script on multiple switches. multiple being a very high number, I would really like to avoid having to click accept on every new host key dialog box that pops up. Any thoughts? |
#2
|
|||
|
|||
Hello lazyjim,
If you are using the Connect method for the Session Object, then you could use the following: Code:
crt.Session.Connect "/SSH2 /accepthostkeys hostname" |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|