클라우드 서버 도움말

Remove SSH keys from your server

You can remove a user's SSH key manually while keeping the user itself intact. This is useful in case an SSH private key gets lost or compromised.

Note: If you already removed the user with the -r flag, their SSH keys have already been deleted and you do not need to complete these steps.

Difficulty: 1
Time: 5 minutes

Remove the SSH key

  1. Log in to your server via SSH.
  2. Switch to the root user:
    sudo su -
  3. Find that user's home directory:
    echo ~user's username

    You will see your user's home directory. This is usually /home/user's username.
  4. Using this path, remove the .ssh folder from that user:
    rm -rf /home/user's username/.ssh

You have removed that user's SSH key.

Create a password

After you have removed the key, you must give this user a password or they will be unable to log in.

  1. Make sure you are still logged in as root.
  2. Use the passwd command to change your user's password:
    passwd user's username
  3. Enter a new password, and then confirm it.

Your user's password is now updated.

Next step

Add an SSH Key to an existing server


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.