0

我想使用 bash 脚本同时打开三个 ec2 实例。我为此使用终结器。以下脚本打开了三个实例,但只有一个关闭后,另一个才会打开。不是同时的。这意味着,我必须使用 key1 实例关闭终端,然后打开其他终端。

terminator -x ssh -i key1 ec2-user@52.x.x.x; 
terminator -x ssh -i key2 ec2-user@52.x.x.x; 
terminator -x ssh -i key3 ec2-user@52.x.x.x;

我希望它们都在一个终端视图中的三个子窗口中打开。此外,在执行脚本时,它给了我这个消息:

** (terminator:21982): WARNING **: Binding '<Shift><Control><Alt>a' failed!
Unable to bind hide_window key, another instance/window has it.
<Window object at 0x7ff93c1776e0 (terminatorlib+window+Window at 0x2afa090)> is not in registered window list
/usr/share/terminator/terminatorlib/terminator.py:87: Warning: Attempt to add property GnomeProgram::sm-connect after class was initialised
  self.gnome_program = gnome.init(APP_NAME, APP_VERSION)
/usr/share/terminator/terminatorlib/terminator.py:87: Warning: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised
  self.gnome_program = gnome.init(APP_NAME, APP_VERSION)
/usr/share/terminator/terminatorlib/terminator.py:87: Warning: Attempt to add property GnomeProgram::display after class was initialised
  self.gnome_program = gnome.init(APP_NAME, APP_VERSION)
/usr/share/terminator/terminatorlib/terminator.py:87: Warning: Attempt to add property GnomeProgram::default-icon after class was initialised
  self.gnome_program = gnome.init(APP_NAME, APP_VERSION)

** (terminator:21995): WARNING **: Binding '<Shift><Control><Alt>a' failed!
Unable to bind hide_window key, another instance/window has it.

我附带了这个运行良好的代码。但这是针对 xterm 的。任何人都可以为终结者提供相同的命令吗?

(xterm -geometry 70x70-0-0 -e ssh -i key1 ec2-user@52.x.x.x;) & 
(xterm -geometry 70x70+485-200 -e ssh -i key1 ec2-user@52.x.x.x;) &
(xterm -geometry 70x70+0-0 -e ssh -i key1 ec2-user@52.x.x.x;) 
4

0 回答 0