- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- SSH & hosts.allow
Operating System - HP-UX
1820483
Members
2235
Online
109624
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО11-22-2007 04:15 AM
тАО11-22-2007 04:15 AM
HI All,
I now have ssh working on my test server (thanks Matti). I want to try and restrict access to certain PC names if possible. I can restrict access to the IP address of my PC by putting an entry sshd:11.22.333.44 in hosts.allow. However, if I change this address to the fully qualified domain name of my pc I am denied access. I can ping the fully qualified domain name of my pc successfully. Is it possible to do this with hosts.allow/hosts.deny?
Thanks,
Tim
I now have ssh working on my test server (thanks Matti). I want to try and restrict access to certain PC names if possible. I can restrict access to the IP address of my PC by putting an entry sshd:11.22.333.44 in hosts.allow. However, if I change this address to the fully qualified domain name of my pc I am denied access. I can ping the fully qualified domain name of my pc successfully. Is it possible to do this with hosts.allow/hosts.deny?
Thanks,
Tim
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2007 04:38 AM
тАО11-22-2007 04:38 AM
Solution
Shalom Tim,
Not that I know of, though a similar device exists in the sshd_config file, it is worth a look.
Generally people use trp_wrappers, free from http://software.hp.com to handle these issues.
SEP
Not that I know of, though a similar device exists in the sshd_config file, it is worth a look.
Generally people use trp_wrappers, free from http://software.hp.com to handle these issues.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-22-2007 07:27 PM
тАО11-22-2007 07:27 PM
Re: SSH & hosts.allow
(SEP: HP-provided SSH uses libwrap, i.e. the same code as in the tcpwrapper utility. Because sshd needs to generate session keys at startup, it is not efficient to make ssh start from inetd.)
Sounds like your DNS service might not have a valid reverse lookup record (PTR record) for your PC. It's not very intuitive, but for DNS, "what's the IP address for this name" and "what's the name of this IP address" are completely unrelated pieces of data, even if they refer to the same name/address pair.
On your test server: run "nslookup name.of.your.pc", then run "nslookup ip.address.of.your.pc". Both should report essentially the same answer. However, I'm guessing you'll be getting something unexpected from the latter query.
When you ping your PC using the FQDN, the ping command needs to find the IP address before it can start sending the pings: this is the "standard" DNS lookup.
When ssh receives a connection, it only knows the source IP address from the packet headers. As the hosts.allow rule might be very complex, it is not efficient to make standard DNS lookups to every hostname listed in the hosts.allow lines. Instead, the libwrap code makes a reverse DNS lookup for the IP address. If the reverse lookup data in the DNS server is up to date, the reverse lookup produces a fully-qualified hostname of the client (your pc, in this case). If this name matches one of the hostnames listed in hosts.allow line, you are granted access.
Unfortunately, forgetting to update the reverse DNS information is one of the most common DNS administration mistakes.
MK
Sounds like your DNS service might not have a valid reverse lookup record (PTR record) for your PC. It's not very intuitive, but for DNS, "what's the IP address for this name" and "what's the name of this IP address" are completely unrelated pieces of data, even if they refer to the same name/address pair.
On your test server: run "nslookup name.of.your.pc", then run "nslookup ip.address.of.your.pc". Both should report essentially the same answer. However, I'm guessing you'll be getting something unexpected from the latter query.
When you ping your PC using the FQDN, the ping command needs to find the IP address before it can start sending the pings: this is the "standard" DNS lookup.
When ssh receives a connection, it only knows the source IP address from the packet headers. As the hosts.allow rule might be very complex, it is not efficient to make standard DNS lookups to every hostname listed in the hosts.allow lines. Instead, the libwrap code makes a reverse DNS lookup for the IP address. If the reverse lookup data in the DNS server is up to date, the reverse lookup produces a fully-qualified hostname of the client (your pc, in this case). If this name matches one of the hostnames listed in hosts.allow line, you are granted access.
Unfortunately, forgetting to update the reverse DNS information is one of the most common DNS administration mistakes.
MK
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-25-2007 08:20 PM
тАО11-25-2007 08:20 PM
Re: SSH & hosts.allow
Thanks for the replies. Points assigned
Tim
Tim
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP