Connection issue using SSH and FileZilla
I cannot connect to my droplet both using SSH and using FileZilla. Using: https://www.infobyip.com/sshservertest.php I can see the IP is active and I can ping it but permission is denied every time.
I have also tried to deactivate the firewall but nothing works. Please some help would be appreciated because a server I cannot access is of little use to me :/
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!
Hello, @simonburgermeister
What you can do is to access your droplet via the console from your DigitalOcean’s control panel and then make sure that your ssh-key is added or you can enable the PasswordAuthentication and then access the droplet from your machine and then add your keys and tweak the configuration if needed.
If you access the droplet via the console you can check if your key is present in the ~/.ssh/authorized_keys file and if not you can add it and this should sort the connectivity issue for you. However if you’re finding difficulties to do so due to issues with the text editor or copying/pasting the key there is another way to achieve this.
You can tweak temporary tweak the ssh configuration and allow PasswordAuthentication in order to access your droplet from your PC. In order to do that you need to access the droplet from the console again.
Use vim or nano to edit the contents of /etc/ssh/sshd_config
Eg.
vi /etc/ssh/sshd_config or nano /etc/ssh/sshd_config
Now go to the very bottom of the file (to the line with PasswordAuthentication) - Change the value next to PasswordAuthentication from no to yes.
It should now look like this:
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
Save the file and then run the following command to reload the SSH config:
sudo service sshd reload
With this done, you can now set up your new SSH key for your LOCAL device. To do this, you can run the following from your LOCAL device, not the server:
ssh-copy-id username@droplet.ip
Alternatively, you can paste in the keys using SSH:
cat ~/.ssh/id_rsa.pub | ssh username@droplet.ip "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"
Note: You need to change username and droplet.ip with your actual username and Droplet’s IP address
Hope this helps!
Let me know how it goes.
Regards, Alex
Thank you for your reply, unfortunatly the PasswordAuthentication in sshd_config was already set to yes so the next steps still don’t work
Get 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.