Report this

What is the reason for this report?

ssh: Permission denied, please try again

Posted on April 5, 2021

Iinstalled virtual machine with FreeBSD os on Virtualbox. When i try to connect root@ip i am asked for password but when i type right one i have error “Permission denied, please try again.” sshd-config on guest machine:

AuthorizedKeysFile .ssh/authorized_keys
PermitRootLogin yes
subsystem sftp /usr/libexec/openssh/sftp-server

Thank you for your answers. When i searched for this problem most of the answers was “change PermitRootLogin to yes” but its already like that in my case.



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

@dirtycornflakes check if your IP address is listening on port 22 first.

nmap -sV -p 22 YOUR.IP.ADDRESS.HERE

If it does, make sure that your IP address is not blacklisted on the server’s side. This can be done using iptables, firewalls, VPN/VPCs, and so on.

If it is inside VirtualBox, try to access other services inside a box, maybe the SSH server isn’t running. Or the networking bridge wasn’t configured correctly.

Hi @dirtycornflakes,

First, try to restart your SSHD service:

service sshd restart

Next if this doesn’t help, try using the -v on SSH.

ssh -v root@IP

See what does the error say, it should give you some pointers as to what might be the problem.

Another reason might be that your port is locked or your IP is not allowed. You can follow eugenehp to see if that’s the case.

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.