By ibrahimindie
My ssh keys were all right till I installed let’s encrypt. since then I had this error
port 22: Connection timed out
I’ve tried to reset my password and tried to install my ssh keys by hand and not from the terminal, nothing works! I can’t access my root user neither my deploy user. How can I fix that, please?
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!
try creating a new user with sudo privileges - install your key(s) to that user and attempt a login
adduser SOMENAME
usermod -aG sudo SOMENAME
vi /home/SOMENAME/.ssh/id_rsa.pub paste your public key
cp -v /home/SOMENAME/.ssh/id_rsa /home/SOMENAME/.ssh/authorized_keys
chmod 600 /home/SOMENAME/.ssh/authorized_keys
Replace SOMENAME with a name of your choice.
Ensure your KeyAgent is running on your working computer
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa
I am assuming your key name is id_rsa and that you are working on a linux of macOS system
then try and ssh to your droplet with the new user using the IP of your droplet
ssh SOMENAME@XXX.XXX.XXX.XXXGet paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.