Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
FYI: Those keys are only used to identify the server to the user,not the other way around. –  andol Jan 5 at 16:12
add comment

1 Answer 1

up vote 0 down vote accepted

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...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.