- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tcp wrappers - guru's?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 02:59 AM
тАО06-24-2004 02:59 AM
1) root to ssh from two hosts, and
2) still allow everyone else from anywhere to ssh to the host.
I looked in the documentation and it does not look as if this is possible.
any bright ideas out there?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:08 AM
тАО06-24-2004 03:08 AM
Re: tcp wrappers - guru's?
Well...it's do-able, but it's not the preferred way to do it.
First thing that would have to be done is convert SSH from a pure daemon to an on-demand process using the inetd.conf file.
So you'd have to pull it's startup out of /sbin/init.d & add /etc/service & /etc/inetd.conf entries.
From there it should be straight-forward.
But I would caution you *very* strongly to not allow direct root logins of any type - even SSH with key-pairs established. You lose a *lot* of auditing ability when root can login directly from anywhere. You're essentially reduced to chasing IPs as that's all you'll have without su/sudo logs to refer to.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:09 AM
тАО06-24-2004 03:09 AM
Re: tcp wrappers - guru's?
You can set the PermitRootLogin parameter nopwd, which means that only key-pair authentication is allowed for root. If you then give the public keys only to the 2 hosts in question, this should do what you require?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:10 AM
тАО06-24-2004 03:10 AM
Re: tcp wrappers - guru's?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:17 AM
тАО06-24-2004 03:17 AM
Re: tcp wrappers - guru's?
PermitLoginroot no --->no login of root only user , before su - root
PermitLoginroot yes ---> login of root
2)use tcpwrapper
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:18 AM
тАО06-24-2004 03:18 AM
Re: tcp wrappers - guru's?
I can confirm that with PAM enabled you loose nothing.
Running SSH in inetd.conf is not the route we choose to go. We have millions of jobs running ssh/scp/rsync/tar/ through sshd 24x7x365.
Again, please no comments about roots ability to ssh!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:20 AM
тАО06-24-2004 03:20 AM
Re: tcp wrappers - guru's?
Your discription is what I explained. This is what we are doing.
My question is how do you configure tcp_wrappers to allow user root from machine x to ssh into machine z?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 03:27 AM
тАО06-24-2004 03:27 AM
Re: tcp wrappers - guru's?
In your question you asked about root and ssh, they were responding to that I think.
As you may know if both hosts have SSH generated keys, then they should have no problem allowing access via ssh between those 2 boxes.
From what I can see if you have PAM then all you need is a properly built /etc/hosts.allow file...
So long as both boxes have SSH running, i dont see why all users won't be able to login via SSH... granted they have a normal password.
If they login via Windows system, then they need the authentication key on their pc/laptop as well.
Here is one of mine...
# cat /etc/hosts.allow
#all : all : banners=/usr/localcw/opt/sysguard/banners : allow
ftpd : all : banners=/usr/localcw/opt/sysguard/banners : allow
telnetd : all : banners=/usr/localcw/opt/sysguard/banners : allow
tftpd : all : banners=/usr/localcw/opt/sysguard/banners : allow
logind : all : banners=/usr/localcw/opt/sysguard/banners : allow
rlogind : all : banners=/usr/localcw/opt/sysguard/banners : allow
remshd: all : banners=/usr/localcw/opt/sysguard/banners : allow
sidftpd : all : banners=/usr/localcw/opt/sysguard/banners : allow
rexecd : all : banners=/usr/localcw/opt/sysguard/banners : allow
sshd : all : banners=/usr/localcw/opt/sysguard/banners : allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 06:07 AM
тАО06-24-2004 06:07 AM
Re: tcp wrappers - guru's?
There is no reason why both boxes need to run sshd. However all our boxes do.
ssh client connects to sshd
Also, pam is used for authentication and logging, in adding to ssh_keys.
My question is how to tell tcp_wrappers to read the login id from the remote host trying to come over with an ssh connection.
From what I have investigated, this is not possible. Unless any tcp wrappers guru can tell me otherwise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 06:12 AM
тАО06-24-2004 06:12 AM
Re: tcp wrappers - guru's?
ssh [-l login_name] hostname
I just tried it with 2 of my boxes and it seems to work.
I dont have Pams running though...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 06:18 AM
тАО06-24-2004 06:18 AM
Re: tcp wrappers - guru's?
you are correct, you can login with any user to another host with ssh -l
this is not the problem.
I want to lock where root can login from trough ssh and tcp wrappers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 06:24 AM
тАО06-24-2004 06:24 AM
Re: tcp wrappers - guru's?
Based on tcp wrappers, the sshd needs to run through /etc/inetd.conf.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 06:25 AM
тАО06-24-2004 06:25 AM
Re: tcp wrappers - guru's?
great idea. we could add an entry in /etc/profile to check if the user is root and the SSH_CLIENT is same then allow, else drop.
sweeeerttttt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 06:26 AM
тАО06-24-2004 06:26 AM
SolutionYou want to restrict root to only 2 boxes... via ssh...
Here is a great doc that you can use to restrict access with...
http://ezine.daemonnews.org/200206/hosts_allow.html
The option i think will help you most is
spawn (command(s)):
Generates a new process that will run the command(s) given, but the spawn commands themselves will not allow or deny the connection, so you must have either " : allow" or " : deny" at the end of the rule in order to make the rule truly effective.
This will allow you to write a script to filter out logins to see if it is a root or other and check the hostname...
If not I am sure something else on the page can give you an idea...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2004 07:12 AM
тАО06-24-2004 07:12 AM
Re: tcp wrappers - guru's?
not too difficult to understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2004 03:03 AM
тАО06-25-2004 03:03 AM
Re: tcp wrappers - guru's?
AllowUsers
This keyword can be followed by a list of user name patterns,
separated by spaces. If specified, login is allowed only for
user names that match one of the patterns. `*' and `?' can be
used as wildcards in the patterns. Only user names are valid; a
numerical user ID is not recognized. By default, login is
allowed for all users. If the pattern takes the form USER@HOST
then USER and HOST are separately checked, restricting logins to
particular users from particular hosts.