I've setup a clean new VPS running Ubuntu 20.04 LTS with Hetzner and would like to access it via ssh.
Here is what I've tried to do:
- I have added my public ssh key (passphrase-less) in Hetzner's online GUI. That looked something like this:
ssh-rsa blahblahblah= my.name@gmail.com
- But when I attempt to
ssh-copy-id
this key to the server, I run into issues. Since I haven't logged into the server to create users, I don't know what to put for theuser
in this command:
ssh-copy-id -i .ssh/id_rsa_pub [user]@serveraddress
I've tried adding the key to root user like so:
ssh-copy-id -i .ssh/id_rsa_pub [user]@serveraddress
But then I'm prompted for a password I don't know.
This leads me to the following questions I've had a hard time finding answers to:
1. How can I use ssh-copy-id
to copy my public key to the server if I haven't setup a user yet?
2. What is the default root
password on the server? How Would I find this out? I've tried ubuntu
, root
, the basics.
3. What does adding a public key via GUI on the server host's website normally do with regards to server users? Does it add the key to the known_hosts
file?
4. What is the technical significance of the final comment line in my public ssh key, currently my.name@gmail.com
?