Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats the easiest way to delete an existing key? 1

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
US
Whats the easiest way to delete an existing key, that was generated by ssh-keygen?
 
Are you talking about the server or client farley?

For the client, look for a file called $HOME/.ssh/id_rsa or $HOME/.ssh/id_dsa or $HOME/.ssh/identity and remove it (or better rename it) - There should be a corresponsing public key file with the same name, but .pub on the end - you need to remove that also.

For the server, look for a file called $HOME/.ssh/authorized_keys - edit it and either remove or comment out the line for the client you wish to disable/remove.

Tell us how you get on,
Scotty
 
I am doing this on the server
I deleted everything in .ssh

But it is still asking for the old paraphase, and wont let me continue....
# ssh-keygen -p
Enter file in which the key is (/root/.ssh/id_rsa):
Enter old passphrase:
Bad passphrase.

How do i get around that?
 
Farley,

# ssh-keygen -p

this will try to change the passphrase on an existing key - not create a new one....

Maybe you want to try something like:


# ssh-keygen -t dsa

Scotty
 
They are both do public key encryption, but in different ways - if my memory serves - DSA makes use of the discrete logarithm problem and RSA makes use of some esoteric number theory. I think DSA is only used for signatures (so my comment about encryption is not quite correct)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top