# PAM error



## mohamed-taher (Dec 15, 2011)

Hello every body, 

I have installed freebsd FreeBSD 7.2 i386 on a VPS. There is a problem when I try to connect with ssh server port 22 through the "root" user. I have experience of adding a new user, log is without problems, any user can log in, but I'm having problems when I try to connect with root user.

Here's a picture of the problem: 







After adding these lines to /etc/ssh/sshd_config:

```
permitrootlogin yes
permitemptypasswords no
passwordauthentication yes
```

I have been able to log in to enter another user, but the root user can not log in through the ssh port, and thanks.


----------



## SirDice (Dec 15, 2011)

Don't enable root logins, use su(1) or security/sudo to gain root access.


----------



## DutchDaemon (Dec 15, 2011)

I hope you  *firewalled* your SSH port, because the entire Internet now knows you allow root logins on  your published IP address ...


----------



## SirDice (Dec 15, 2011)

They're going to try anyway, even if you don't tell anyone


----------



## mohamed-taher (Dec 16, 2011)

Thanks SirDice for help, thank you so much DutchDaemon, I will firewall my ssh.

But I really want to log in with ssh using "root". I have a work will not be completed without root user. Anyway I have installed security/sudo but the same problem, I can not access the root user. Is there hope?


----------



## SirDice (Dec 16, 2011)

Login as a normal user then use sudo(8) to gain root.


----------



## mohamed-taher (Dec 16, 2011)

```
xxxxx is not in the sudoers file.  This incident will be reported.  xxxxx = normal user
```


----------



## SirDice (Dec 16, 2011)

You do realize you need to _configure_ sudo(8)? See visudo(8) and sudoers(5).


----------

