LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-20-2007, 08:47 AM   #1
oudoubah
LQ Newbie
 
Registered: Oct 2005
Location: France
Distribution: Arch
Posts: 23

Rep: Reputation: 0
"sudo -u user ssh server" fails to connect


Hi,

I've a server where i configured sshd like this :
Code:
...
AllowUser user1
Port 1234
...
user1 is in a jail

On my client, i have 1 user :
user1 in a jail. When he's logged in, ssh -p 1234 server success.

root is allowed to do everithing with sudo.

But, when root try [i]sudo -u user1 ssh -p 1234 user1@server[i], i've this error message : too many authentification failures.

I use a second sshd daemon on server, because i want to separate streams (some TCP 22 are closed on firewalls for security. Only chrooted users could log on with sshd on port 1234)

Thanks
 
Old 06-21-2007, 03:30 AM   #2
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
do you need user1 to be able to access the system?

also what is all in the jail? do you have a jail etc/passwd etc/group and all required libraries?

Code:
On my client, i have 1 user :
user1 in a jail. When he's logged in, ssh -p 1234 server success.
when he is logged in on the terminal or ssh?
 
Old 06-21-2007, 04:48 AM   #3
oudoubah
LQ Newbie
 
Registered: Oct 2005
Location: France
Distribution: Arch
Posts: 23

Original Poster
Rep: Reputation: 0
user1 on server and client are in a jail. They must not have access to the system.

On the client, when i do on a terminal (as root):
Code:
su - user1
ssh -p 1234 server
it success.

In my jail, i've all libraries. /jail/etc/goup and /jail/etc/passwd are OK.
 
Old 06-21-2007, 06:45 AM   #4
oudoubah
LQ Newbie
 
Registered: Oct 2005
Location: France
Distribution: Arch
Posts: 23

Original Poster
Rep: Reputation: 0
I've the solution, but i don't understand

If i put MaxAuthRetry to 1, sudo ssh doesn't work. If i set it to 2, it works.

Is anybody have an idea why ?
 
  


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 issue ""Server unexpectedly closed network connection" Errsta_Fonzarelli Linux - Software 12 05-24-2010 02:35 PM
Using the "sudo" command as a user swampdog2002 Slackware 9 08-29-2006 12:22 PM
"su root" fails when I connect with normal user thru SSH AlinFaur Linux - Security 5 02-22-2006 11:26 PM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM
normal user want to perform "init 6" by using " sudo acbenny Linux - General 3 08-08-2004 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:31 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