0

I have a new dedicated server, which I currently access with username and password over ssh. I have not yet set up an ssh key. I am just looking into it now.

So this is a new server with ubuntu freshly installed, is it normal that the /etc/ssh/ directory already has ssh_host_ecdsa_key and ssh_host_rsa_key files on it? I can also see.pub files for these as well.

Does this mean whoever set up the server can access it using those key files? I want to be the only person who can log in to my server.

I am not an experienced linux user, still trying to learn.

Thanks

1
  • FYI: Those keys are only used to identify the server to the user,not the other way around.
    – andol
    Jan 5, 2014 at 16:12

1 Answer 1

0

Yes, ssh server keys are normally created during installation of the openssh server package. But don't worry, if you don't want to use those, just create your own new ones:

ssh-keygen -b 2048 -f /etc/ssh/ssh_host_rsa_key

then restart sshd.

Of course, if your hosting provider wanted to compromise your server, they could have installed a compromised copy of ssh-keygen. Or maybe /bin/ls...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .