LinuxQuestions.org
Help answer threads with 0 replies.
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 07-20-2002, 10:58 AM   #1
ifm
Member
 
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Rep: Reputation: 15
SSH user IP restricted access???


Is there a way to tell sshd on a server to _STRICTLY_ only accept an ssh connection from a particular user at a particular IP?

Like say "bob" connects from ip "123.123.123.123", to a server. Can I set the server to ONLY allow bob to connect from that ip, and no other?

If I can do this... mind pointing me to some docs, or a howto? I cant seem to find anything :-(
 
Old 07-20-2002, 12:33 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
man sshd_config: AllowUsers, user@host, tho man states if user@host is used both user and host are checked separately so dunno if you have to string this together with DenyUsers to not allow another_user@same_host.

Last edited by unSpawn; 07-20-2002 at 12:38 PM.
 
Old 07-20-2002, 02:28 PM   #3
ifm
Member
 
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124

Original Poster
Rep: Reputation: 15
Hmmm... yeah, the man pages were confusing me, so thus why I came here

I will figure it out...

Mainly I am trying to have two servers talk to each other through ssh special users, which I use a signed cert between the machine to do so (so it doesnt ask for password on automated processes)... so I kind of wanted to add a lil bit more security of making ALL those special users only allowed from one server to the other etc, so no one could use them unless they were ON a particular server to begin with.

I'm just a paranoid flick.
 
Old 07-21-2002, 12:01 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
Ok. Here's what I can see as a checklist for possible options:
- If you're not providing connectivity for many users, see if you're able to use TCP wrappers to have sshd only accept connections from known trusted hosts, because since sshd-2.9(aprox) doesn't do "AllowFrom" anymore, that would help against ppl connecting from hostX. Same goes for firewalling if you're not providing connectivity for many users and really, really paranoid.
- Using "AllowUsers user0@host0 user1@host1" in sshd_config would allow only those users to connect from that host. The manpage is a bit vague tho stating "user and host are checked separately".
- Next up would be to add the from="" option to each key in authorized_keys to only allow auth per key auth from hosts in their fromlist, if your doing non-interactive logins I guess you already added the command="" to those keys in authorized_keys.

If I'm not forgetting something and these options work, then as far as I can see you'll only have to worry about the usual cert and key grabbing. DenyUsers will only work if you manage to add *all* the users denied access from *all* hosts, which is a nightmare if you manage a lot of hosts needing connections.

HTH somehow.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to add user with root privileges and SSH access adamrad Linux - General 8 10-31-2006 03:53 PM
only FTP access to user not ssh or telnet farhank Linux - Security 3 10-27-2005 10:30 AM
Restricted access sachinh Linux - Security 2 09-29-2004 04:30 AM
Is Restricted SSH Access Possible? retep Linux - Security 2 09-28-2003 12:35 AM
ssh access allowed only to root user? zovres Linux - Newbie 5 09-25-2003 05:19 PM

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

All times are GMT -5. The time now is 08:16 PM.

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