48.4. Managing public SSH keys for users


Identity Management allows you to upload a public SSH key to a user entry. The user who has access to the corresponding private SSH key can use SSH to log into an IdM machine without using Kerberos credentials. Note that users can still authenticate by providing their Kerberos credentials if they are logging in from a machine where their private SSH key file is not available.

48.4.1. Uploading SSH keys for a user using the IdM Web UI

Identity Management allows you to upload a public SSH key to a user entry. The user who has access to the corresponding private SSH key can use SSH to log into an IdM machine without using Kerberos credentials.

Prerequisites

  • Administrator privileges for managing the IdM Web UI or User Administrator role.

Procedure

  1. Log into the IdM Web UI.
  2. Go to the Identity>Users tab.
  3. Click the name of the user to edit.
  4. In the Account Settings section, click the SSH public keys Add button.
  5. Paste the Base 64-encoded public key string into the SSH public key field.
  6. Click Set.
  7. Click Save at the top of the IdM Web UI window.

Verification

  • Under the Accounts Settings section, verify the key is listed under SSH public keys.

48.4.2. Uploading SSH keys for a user using the IdM CLI

Identity Management allows you to upload a public SSH key to a user entry. The user who has access to the corresponding private SSH key can use SSH to log into an IdM machine without using Kerberos credentials.

Prerequisites

  • Administrator privileges for managing the IdM CLI or User Administrator role.

Procedure

  1. Run the ipa user-mod command with the --sshpubkey option to upload the base64-encoded public key to the user entry.

    $ ipa user-mod user --sshpubkey="ssh-rsa AAAAB3Nza...SNc5dv== client.example.com"

    Note in this example you upload the key type, the key, and the hostname identifier to the user entry.

  2. To upload multiple keys, use --sshpubkey multiple times. For example, to upload two SSH keys:

    --sshpubkey="AAAAB3Nza...SNc5dv==" --sshpubkey="RjlzYQo...ZEt0TAo="
  3. To use command redirection and point to a file that contains the key instead of pasting the key string manually, use the following command:

    $ ipa user-mod user --sshpubkey="$(cat ~/.ssh/id_rsa.pub)" --sshpubkey="$(cat ~/.ssh/id_rsa2.pub)"

Verification

  • Run the ipa user-show command to verify that the SSH public key is associated with the specified user:

    $ ipa user-show user
    User login: user
      First name: user
      Last name: user
      Home directory: /home/user
      Login shell: /bin/sh
      Principal name: user@IPA.TEST
      Principal alias: user@IPA.TEST
      Email address: user@ipa.test
      UID: 1118800019
      GID: 1118800019
      SSH public key fingerprint: SHA256:qGaqTZM60YPFTngFX0PtNPCKbIuudwf1D2LqmDeOcuA
                                  user@IPA.TEST (ssh-rsa)
      Account disabled: False
      Password: False
      Member of groups: ipausers
      Subordinate ids: 3167b7cc-8497-4ff2-ab4b-6fcb3cb1b047
      Kerberos keys available: False

48.4.3. Deleting SSH keys for a user using the IdM Web UI

Follow this procedure to delete an SSH key from a user profile in the IdM Web UI.

Prerequisites

  • Administrator privileges for managing the IdM Web UI or User Administrator role.

Procedure

  1. Log into the IdM Web UI.
  2. Go to the Identity>Users tab.
  3. Click the name of the user to edit.
  4. Under the Account Settings section, under SSH public key, click Delete next to the key you want to remove.
  5. Click Save at the top of the page.

Verification

  • Under the Account Settings section, verify the key is no longer listed under SSH public keys.

48.4.4. Deleting SSH keys for a user using the IdM CLI

Follow this procedure to delete an SSH key from a user profile by using the IdM CLI.

Prerequisites

  • Administrator privileges for managing the IdM CLI or User Administrator role.

Procedure

  1. To delete all SSH keys assigned to a user account, add the --sshpubkey option to the ipa user-mod command without specifying any key:

    $ ipa user-mod user --sshpubkey=
  2. To only delete a specific SSH key or keys, use the --sshpubkey option to specify the keys you want to keep, omitting the key you are deleting.

Verification

  • Run the ipa user-show command to verify that the SSH public key is no longer associated with the specified user:

    $ ipa user-show user
    User login: user
      First name: user
      Last name: user
      Home directory: /home/user
      Login shell: /bin/sh
      Principal name: user@IPA.TEST
      Principal alias: user@IPA.TEST
      Email address: user@ipa.test
      UID: 1118800019
      GID: 1118800019
      Account disabled: False
      Password: False
      Member of groups: ipausers
      Subordinate ids: 3167b7cc-8497-4ff2-ab4b-6fcb3cb1b047
      Kerberos keys available: False
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동