You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have 2 systems I work with that are daisy chained. System A is what I have to connect to initially, then I ssh into system B to run commands to view status of services and other things.
What I want to do is have a ruby script that can get into system B to run some commands and then pass the output from those commands back into my laptop automatically.
I can use ruby gem net/ssh to get into system A and run commands but I cannot figure out how to ssh into system B after I am in system A. This is what I have right now.
Net::SSH.start('123.456.78.9', 'username', password: 'password') do |ssh|
# some how ssh into system b
end
I tried just ssh.exec! "ssh 123.456.78.30" but that does not work. I tried nesting another Net::SSH.start call but that doesn't work either.
Please help.
The text was updated successfully, but these errors were encountered:
I have 2 systems I work with that are daisy chained. System A is what I have to connect to initially, then I ssh into system B to run commands to view status of services and other things.
What I want to do is have a ruby script that can get into system B to run some commands and then pass the output from those commands back into my laptop automatically.
I can use ruby gem net/ssh to get into system A and run commands but I cannot figure out how to ssh into system B after I am in system A. This is what I have right now.
I tried just ssh.exec! "ssh 123.456.78.30" but that does not work. I tried nesting another Net::SSH.start call but that doesn't work either.
Please help.
The text was updated successfully, but these errors were encountered: