I'm trying to understand the difference bw these two files:
Which one's on the server side? which one on the client, connecting via ssh to a remote host?
I ask this, following this question that popped up in a quiz for the LPIC1 exam 102:
Wade’s OpenSSH private key was compromised, so he needs to create himself a new public/ private key pair. Using super user privileges, what command should he use?
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -t rsa -f /etc/ssh/ssh_host_ecdsa_key
ssh-keygen -t rsa -f ~/.ssh/id_rsa_key
ssh-keygen -t rsa -f ~/.ssh/id_ecdsa_key
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key.pub
The correct answer seems to be 1. but I'd opted for 3. Why is 1. correct? how is it different than 3.?