Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Fantastic tutorial. I was able to follow the instructions and connect to the server using the key-based authentication. One thing though, is this supposed to work for only one client machine? I used ssh-copy-id without any trouble. I try to follow the same process using a different laptop and i can’t connect to the server since it is now asking for a key. I changed the sshd config to allow password authentication but it appears it now defaults to key-based authentication and i’m unable to use ssh-copy-id from the 2nd client (since it doesn’t have they key yet). Should be a looking at another process for setting up the 2nd client? I really hope i don’t have to manually copy the key…
@hjet I’m just digging my way through the manual, there might be further commentaries, yet here we go.
ssh-copy-id username@remote_host
nope.no. no way. more like:
ssh-copy-id -i 666 ***.***.**.xx
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "666.pub"
The authenticity of host 'xxx.xxx.xx.xx (xxx.xxx.xx.xx)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to
install the new keys
ak666@xxx.xxx.xx.xx's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'xxx.xxx.xx.xx'"
and check to make sure that only the key(s) you wanted were added.
The correct syntax I happened to learn here, however, quite some time was wasted to brute-force the correct flags.
Please edit that code block, trifles like that demotivate a lot.
And thanks for the man, since it is truly monumental :)
I’m sticking with manual copy key ( accidentally lost my private key in my local machine :( ). But when i copy-paste my new public key into the default terminal in the digital ocean, this content copy just not the same as mine in local machine. I guess i must type every single character in that pub key. Does any one have any suggestions?
Beware of Step 2 if you are using the manual method to add your SSH key—the paste function has problems with the DO console.
I have done till 2nd step successfully and following 3rd step. When i tried to login, it says login incorrect.
How i did that? I opened console and tried this command with sudo and without sudo after login: ssh root@remote-host and then entered password.
thanks
Step 1:
Run ssh-add on the client machine to add the SSH key to the agent in order to avoid an error.
sign_and_send_pubkey: signing failed: agent refused operation