У меня такая топология
R1 <---- JumpServer1 <--- Script ---> JumpServer2 ---> R2
s sh config file
host jumphost1
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
user username
hostname IP_Jump1
host jumphost2
IdentityFile ~/.ssh/id_rsa2
IdentitiesOnly yes
user username
hostname IP_Jump2
host jumphost1
ProxyCommand ssh jumphost nc %h %p
host jumphost2
ProxyCommand ssh jumphost nc %h %p
python3 сценарий
netmiko.ConnectHandler (ip = R1 or R2, device_type : cisco_ios,
'username' : 'username', 'password' : 'password',
'ssh_config_file' : '~/.ssh/config')
как сообщить ConnectHandler, если go к R1 через JumpServer1, если go к R2 через JumpServer2? или я должен сделать 2 разных файла config s sh? & возможно ли сделать это 2 файла конфигурации s sh?