Pushing a public key using the Central Management System CLI

Prev Next

Use the commands in this section to push the public key of an SSH-DSA2 or SSH-RSA2 identity to the managed appliance. When a remote Central Management System user and this identity are used to authenticate against the appliance, the connection is established only if the appliance already has this key.

Note

You can also use the Central Management System Web UI to push the key. For details, see Configuring global host key authentication using the Web UI.

To push a public key:
  1. Log in to the Central Management System CLI.

  2. Go to CLI configuration mode:

    cm-hostname > enable
    cm-hostname # configure terminal
  3. Push the key to the appliance:

    cm-hostname (config) # cmc appliance <applianceID> auth <keyType> identity <identityName> push [username <username> password <password>]

    where the username and password options allow the remote user to log in to the appliance to push the public key before the appliance is connected.

  4. Verify your change:

    1. Log in to the managed appliance CLI.

    2. Go to CLI enable mode:

      appl-hostname > enable
    3. Verify that the key is present:

      appl-hostname # show ssh client

Examples

Pushing an SSH-DSA2 public key

The following example displays the public key string of the Central Management System SSH-DSA2 identity named "admin4," and then pushes it to the Email Security — Server appliance. It then displays the SSH authorized keys on the Email Security — Server appliance to verify that the key was pushed.

CM-08 (config) # cmc auth ssh-dsa2 identity admin4
CM-08 (config) # show cmc auth identities
DSA2 identity admin4:
   Public Key:
ssh-dss AAA3NzaC1kc3MAAACBAJl3PisWNnz/gYLvL4JC7xFMoq3HE89rai7trnJmpxjylArYhf
MzaGndFA4qGRZMFzhiz9Jhi/+W1ufIrXLGzakC0lAAAAFQCuMCsMwMGN9zT5w2JCiDt7D6orNwAA
.
.
CM-08 (config) # cmc appliance EX-03 auth ssh-dsa2 identity admin4 push
Push of identity for user admin onto EX-03 succeeded.
EX-03 # show ssh client
.
.
SSH authorized keys:
  User admin:
    Key 1: 
ssh-dss AAA3NzaC1kc3MAAACBAJl3PisWNnz/gYLvL4JC7xFMoq3HE89rai7trnJmpxjylArYhf
MzaGndFA4qGRZMFzhiz9Jhi/+W1ufIrXLGzakC0lAAAAFQCuMCsMwMGN9zT5w2JCiDt7D6orNwAA
.
.
.
Pushing an SSH-RSA2 public key and establishing a connection

The following example logs the remote user into the Email Security — Server appliance to push the Central Management System SSH-RSA2 identity named "admin6" to the Email Security — Server appliance. It then establishes the connection between the Central Management System platform and the Email Security — Server appliance.

CM-02 (config) # cmc appliance EX-05 address 172.17.74.54
CM-02 (config) # cmc appliance EX-05 auth ssh-rsa2 identity admin6 push username admin password admin
CM-02 (config) # cmc appliance EX-05 authtype ssh-rsa2
CM-02 (config) # cmc appliance EX-05 auth ssh-rsa2 identity admin6
CM-02 (config) # show cmc appliances EX-05
Appliance EX-05:

  Connection status:
     Connected:         yes (server-initiated)
     .
     .
     .
    Authentication:
       Authentication type:   ssh-rsa2
       password username:    admin
       password password:    ********
       ssh-dsa2 username:    admin
       ssh-dsa2 identity:
       ssh-rsa2 username:    admin
       ssh-rsa2 identity:    admin6