ssh: Permission denied, please try again

Posted April 5, 2021 1.7k views

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.

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.

Submit an Answer
2 answers

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


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.