gnome-terminal and ssh commands

herbsims

New Member
Joined
Jan 14, 2020
Messages
2
Reaction score
0
Credits
0
Ladies and Gents,

I am working with gnome-terminal and trying to set up a bash script to do the following:
1) Open up a new gnome-terminal - got that working
2) in the new window, ssh to another computer (let's call it XYZ) - got that working

This is what is NOT working.
3) In that (XYZ) computer, I want to ssh to another computer (call it ABC)
a) It is the only way we can get to computer ABC, so don't ask. :)
I can open the window, ssh to XYZ, but how do I have another ssh command to fire off? I cannot use a .script on computer XYZ to fire off an SSH because we have multiple shells open (up to 10-12) where they ssh to XYZ, then ssh to several computers.

Thanks in advance!

Herb
 


Could you put a script on the gnome-terminal computer, then run it remotely on zyx?

like:
Code:
ssh user@xyz "bash -s" < /path/to/local/script.sh

'local script' would have the list of other servers you want to ssh into.
 
you also see what's happening in the background by using '-v' option
ssh -v user@ABC to enable the verbose mode
 
someone else suggested the ssh -J XYZ ABC and that works. now I am trying to get a command (via the ssh line) into ABC but then gnome-terminal closes down immediately.....sigh...
 


Top