<pre><code>kops delete secret --name cluster-1.dev.transein.com sshpublickey admin 2c:yy
</code></pre>

CC BY-SA 4.0
2019-12-24T09:47:53.633Z
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?
Bruce Becker
CC BY-SA 4.0
2019-12-25T08:38:50.880Z
Please reply to the comment and mark the answer as accepted once updated.
030
CC BY-SA 4.0
2019-12-27T15:20:53.897Z
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.
Jithin Kumar S
CC BY-SA 4.0
2019-12-24T07:22:51.593Z
2019-12-25T08:39:21.503Z
2019-12-25T08:39:21.503Z
Jithin Kumar S
<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>

<kubernetes><kubectl><kops>
Kops: How to delete the multiple SSHPublicKey
Jithin Kumar S
# 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 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.  

---

