
Chapter 3: mx Commands 53
Specify servers in the .matrixrc file
If you need to control which server is used for the mx connection, list the
servers individually in the matrixrc file or use the mx --matrix command-line
option. If any server can be used for the connection, you can group the
servers.
List servers individually
Add a line to the file for each server for which you want mx access and
specify the appropriate username and password. This example specifies that
srv3 is the default.
srv1 administrator secret1
srv2 administrator secret1
srv3 administrator secret2 default
When you issue a mx command without specifying a server name, as in the
following example, it connects to the machine specified as the default in the
.matrixrc file.
mx server status
To connect to a different server, include the --matrix option and specify the
server name on the command line. For example, the following command
connects to server acme1 as user admin using the password secret1.
mx --matrix srv1 server status
Use wildcards
You can use wildcards in the .matrixrc file to match machine names:
srv3 administrator secret1 default
srv* administrator secret1
In the following command, --matrix srv8 matches the wildcard. When the
--matrix option is not specified, the connection is made to srv3, the default;
the machine specified as the default cannot contain a wildcard.
mx --matrix srv8 server status
If you specify any server names in addition to the wildcard, the wildcard
must be at the end of the list of servers as in the above example. The wildcard
matches servers according to the order in which they are listed in the file and
can mask other entries that appear below it in the list.
Comentários a estes Manuais