LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-20-2006, 09:34 AM   #1
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 137

Rep: Reputation: 15
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
 
Old 05-20-2006, 09:50 AM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
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

Last edited by Brian1; 05-20-2006 at 09:52 AM.
 
Old 05-20-2006, 10:31 AM   #3
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 15
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
 
Old 05-21-2006, 09:07 AM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Is there a .ssh directory in thier home directory?

Brian1
 
Old 05-21-2006, 01:56 PM   #5
zaphod_es
Member
 
Registered: Jun 2003
Location: Brazil
Distribution: Ubuntu
Posts: 137

Original Poster
Rep: Reputation: 15
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh -- Permission denied (publickey,password,keyboard-interactive). davidkline Linux - Networking 11 08-20-2014 02:19 PM
No longer able to log into ssh. Password right but "permission denied" Baix Linux - Software 11 11-21-2008 12:44 PM
SSH permission denied on Mandriva 2006 EvilAngel Mandriva 7 03-23-2006 10:44 PM
ssh login with normal user, receive: /dev/null: Permission denied mark78301 Red Hat 3 11-12-2005 09:20 AM
SSH Permission Denied Chimney Linux - Security 1 11-10-2005 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration