Question

ssh: Permission denied, please try again

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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

@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.