Answers: <pre><code>kops delete secret --name cluster-1.dev.transein.com sshpublickey admin 2c:yy
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2019-12-24T09:47:53.633Z
Answers: Hi! Glad you found the answer, but this oneliner is not going to be helpful for anyone else. Can you please enrich the answer with some explanation of what it does, and why this is the correct answer?
Answers: Bruce Becker
Answers: CC BY-SA 4.0
Answers: 2019-12-25T08:38:50.880Z
Answers: Please reply to the comment and mark the answer as accepted once updated.
Answers: 030
Answers: CC BY-SA 4.0
Answers: 2019-12-27T15:20:53.897Z
Answers: hey Bruce, reason is we can have multiple keys under the same name before applying into cluster but when applying to cluster it will show an error that multiple sshkeys are there you need to remove one ! so at that time we need to pass the id along with the delete command to remove the desired key. Hope it clarified.
Answers: Jithin Kumar S
Answers: CC BY-SA 4.0
Answers: 2019-12-24T07:22:51.593Z
Answers: 2019-12-25T08:39:21.503Z
Answers: 2019-12-25T08:39:21.503Z
Answers: Jithin Kumar S
Body: <pre><code>SSHPublicKey    admin   2b:xx:
  SSHPublicKey    admin   2c:yy
  
  </code></pre>
  
  <p>How to remove one ssh key from the cluster ?
  when tried to delete via normal way,</p>
  
  <pre><code>kops delete secret --name cluster-1.dev.transein.com sshpublickey admin
  
  </code></pre>
  
  <p>found multiple matching secrets; specify the id of the key</p>
  
  <p>How to remove one , or even the entire sshkey</p>
  
Tags: <kubernetes><kubectl><kops>
Title: Kops: How to delete the multiple SSHPublicKey
UserDisplayName: Jithin Kumar S
ThreadText: # Kops: How to delete the multiple SSHPublicKey
  
  (Asked by: username_0 on 2019-12-23)
  
  ```
  SSHPublicKey    admin   2b:xx:
  SSHPublicKey    admin   2c:yy
  
  ```
  
  How to remove one ssh key from the cluster ?
  when tried to delete via normal way,
  
  ```
  kops delete secret --name cluster-1.dev.transein.com sshpublickey admin
  
  ```
  
  found multiple matching secrets; specify the id of the key
  
  How to remove one , or even the entire sshkey
  
  **Tags:** kubernetes, kubectl, kops
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-12-24. Score: 2
  
  ```
  kops delete secret --name cluster-1.dev.transein.com sshpublickey admin 2c:yy
  
  ```
  
  > **Comments:**
  > **username_1**: Hi! Glad you found the answer, but this oneliner is not going to be helpful for anyone else. Can you please enrich the answer with some explanation of what it does, and why this is the correct answer?  
  > **username_2**: Please reply to the comment and mark the answer as accepted once updated.  
  > **username_0**: hey username_1, reason is we can have multiple keys under the same name before applying into cluster but when applying to cluster it will show an error that multiple sshkeys are there you need to remove one ! so at that time we need to pass the id along with the delete command to remove the desired key. Hope it clarified.  
  
  ---
  
  