LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ssh -Permission denied (https://www.linuxquestions.org/questions/linux-networking-3/ssh-permission-denied-446698/)

zaphod_es 05-20-2006 09:34 AM

ssh -Permission denied
 
There is no problem logging into my Ubuntu 5.10 server as root or as user zaphod. When I try to log in as user friend it tells me:

$ ssh friend@lw
friend@lw's password:
Permission denied, please try again.

On the server /var/log/auth.log says:

May 20 15:58:14 lunkwill sshd[10161]: User friend from 192.168.111.12 not allowed because not listed in AllowUsers
May 20 15:58:14 lunkwill sshd[10161]: Failed none for invalid user friend from 192.168.111.12 port 49560 ssh2


On the server the /etc/ssh/sshd_conf reads:

Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
IgnoreRhosts yes
RhostsRSAAuthentication no
HostbasedAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication no
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yes
AllowUsers zaphod rol friend


Where did it go wrong?

ZB

Brian1 05-20-2006 09:50 AM

Does a user account friend exist on the machine. With out it the ssh login does not know the permission levels the user has. Create a user account and try again. The AllowedUsers option will define only the users allowed excluding everyone else.

Also it can be a security risk to allow root to login straight through ssh. Especially if it has a weak password. Login as a user and if you need root access then use ' su ' to get root access.

Brian1

zaphod_es 05-20-2006 10:31 AM

Yes there is a user friend :) I know that it is not a good idea to run as root and I only added that to test my current problem.

ZB

Brian1 05-21-2006 09:07 AM

Is there a .ssh directory in thier home directory?

Brian1

zaphod_es 05-21-2006 01:56 PM

There is no .ssh directory as it is a small home network and there is no access to the server from outside the lan. I do not use public keys on the local network.

ZB


All times are GMT -5. The time now is 12:44 AM.