Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-20-2002, 10:58 AM
|
#1
|
Member
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124
Rep:
|
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 :-(
|
|
|
07-20-2002, 12:33 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
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.
|
|
|
07-20-2002, 02:28 PM
|
#3
|
Member
Registered: Jun 2002
Location: USA
Distribution: RH7.3 & YDL2.1
Posts: 124
Original Poster
Rep:
|
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.
|
|
|
07-21-2002, 12:01 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,415
|
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.
|
|
|
All times are GMT -5. The time now is 08:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|