Jump Host to Remote Server -All-Script Challenge
Okay, I've searched all weekend and can't figure out how to solve this.
== 600 SERVERS TO GET DATA FROM ==
I have 600 servers distributed across 75 branch offices. Each branch office has their own jump server. The passwords are all different. I have to pull statuses (just run a couple commands) from all 600 servers.
== CAN SCRT DO IT? ==
Is it possible to use SecureCRT to log into these with a script?
I set up a saved SCRT session to one of the jump servers, then did dynamic port forwarding. Then I set up a session to one of the target servers, specifying the firewall from above. It worked.
But the problem is there is no way to import the 75 jump hosts or 600 servers with passwords into SCRT as saved sessions, and manually entering all 675 the passwords isn't a whole lot easier than just doing it all manually.
== DATA LOOKS LIKE THIS ==
So I need to run it all from a script. I have it already in a spreadsheet. Like this (fake but similar data)
Jump_IP JH-user JH-pass Server IP srv-usr srv-pass
10.1.1.1 freda oi43uomfw 172.20.1.1 admin1 345d5
10.1.1.1 freda oi43uomfw 172.20.1.2 roberta spdoowu598
10.1.1.1 freda oi43uomfw 172.20.1.3 admin1 l6yhl8ik6
10.1.1.1 freda oi43uomfw 172.20.1.4 admin3 wwfwcf5refg
10.1.2.1 admin iuycowiuy 172.20.2.1 webms4 4edyff5ys5y
10.1.2.1 admin iuycowiuy 172.20.2.2 adminxx r7h8htl8o
10.1.2.1 admin iuycowiuy 172.20.2.3 Adminul das4fasy646y
10.1.2.1 admin iuycowiuy 172.20.2.4 Bharlety df5u6gi7hhi
10.1.2.1 admin iuycowiuy 172.20.2.5 admintx ca4f4lkjl
== POSSIBILITY? ==
Can I use the /firewall option?
I would have to guess I can set the port forwarding at the cmd line somehow, but can't find how.
connect ssh2 JumpHost Session username password etc. -port forwarding stuff Wait for command prompt connect ssh2 Server session usnername password etc. -specify firewall above? or use port wait for command prompt run version command wait for results send exit (from Server) disconnect send exit (from JumpHost) disconnect
Last edited by VanDyke82nev; 12-03-2017 at 07:49 PM.
|firewall , jump host , port forwarding , ssh hop|
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Display Modes||Rate This Thread|