troubleshooting Question

Remove ssh key pair generated - Linux

Avatar of carlino70
carlino70Flag for Argentina asked on
Linux
4 Comments1 Solution495 ViewsLast Modified:
Hi experts, I made a setup ssh key-pairs between two servers.
It worked well, but now I want to delete it.
The problem is that as it is now prompted for authentication locally to the application when trying to run a script for it. For example to run a stop_app, asks me to enter the user password ( should not ).
Here are the steps I did:
server_1:/home/user/> ssh-keygen -t rsa
I not joined the "passphrase" twice, then 2 files were generated:
id_dsa
id_dsa.pub
I copied id_dsa_pub to the server_2:
server_1:/home/user/scp id_rsa.pub user@server_2:/home/user/.ssh/
Prior backup, renamed it id_rsa.pub:
server_2:/home/user/cp -p authorized_keys authorized_keys_bkp
server_2:/home/user/mv id_rsa.pub authorized_keys
I grant permission to the new file:
server_2:/home/user/chmod 644 authorized_keys
To try to remove the entries, I tried on both servers:
ssh-keygen -R hostname
without positive results.
Then, when I returned to the previous file, "autorized_keys", I try:
server_1:/home/user/>ssh user@server_2:/home/user
I see the message:
ssh server_2:/home/user: Temporary failure in name resolution
I did not make a backup of known_hosts.
What are the correct steps to roll back the configuration?
Tkankyou in advanced, regards.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros