- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: SSH - blocking SLOGIN from another server
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
Forums
Discussions
Discussions
Discussions
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
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
05-06-2008 08:48 AM
05-06-2008 08:48 AM
SSH - blocking SLOGIN from another server
The problem we're trying to address is users on the Linux box can SLOGIN over to the HP-UX server (requiring a password). We'd like this blocked so they can only login if they connect directly to the HP-UX server.
We have RSA tokens in place and want them to use the tokens every time they connect to the HP-UX server - we don't want them logging into the Linux server and then SLOGGING in to the HP-UX server (bypassing their RSA token).
For technical reason I won't get into, the Linux server isn't setup to require the RSA token (it's on the other side of a firewall).
We tried the AllowUsers option in sshd_config, but this ended up also blocking the direct logins.
So, to summarize:
1) we need the 2 servers to transfer data back and forth using SCP as a non-human user (a user than can not login direct to either server)
2) we want users to login direct to the HP-UX server
3)we do not want users to be able to SLOGIN from the Linux server over to the HP-UX server
Thanks for any advice!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 08:57 AM
05-06-2008 08:57 AM
Re: SSH - blocking SLOGIN from another server
Enable TCP-WRAPPERs. edit hosts.deny file with IP of linux server
If it were telnet I would say to modify the /var/adm/inetd.sec
You can play with IPsec
You can modify the sshd_config and maybe use #HostbasedAuthDenyUsers (not sure about this one )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 09:04 AM
05-06-2008 09:04 AM
Re: SSH - blocking SLOGIN from another server
# what /usr/sbin/sshd
and look for tcp wrappers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 09:07 AM
05-06-2008 09:07 AM
Re: SSH - blocking SLOGIN from another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 09:24 AM
05-06-2008 09:24 AM
Re: SSH - blocking SLOGIN from another server
PasswordAuthentication no
If that still allows passwords you can either update ssh, or change
UsePAM no
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 09:30 AM
05-06-2008 09:30 AM
Re: SSH - blocking SLOGIN from another server
sshd : linux_host : DENY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 10:02 AM
05-06-2008 10:02 AM
Re: SSH - blocking SLOGIN from another server
if he blocks the host. then his process that copies files from the linux server to the hpux server will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 10:08 AM
05-06-2008 10:08 AM
Re: SSH - blocking SLOGIN from another server
sshd: linux_host EXCEPT user@linux_host
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 10:42 AM
05-06-2008 10:42 AM
Re: SSH - blocking SLOGIN from another server
The message I got was:
ssh_exchange_identification: Connection closed by remote host
lost connection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 11:31 AM
05-06-2008 11:31 AM
Re: SSH - blocking SLOGIN from another server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 11:56 AM
05-06-2008 11:56 AM
Re: SSH - blocking SLOGIN from another server
The PID file is important because it is used in the RC start/stop sequencer.
You can also create separate /etc/rc.config.d/sshd and /sbin/init.d/secsh files and rc?.d links
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 12:01 PM
05-06-2008 12:01 PM
Re: SSH - blocking SLOGIN from another server
I missed the "back and forth" parth of item 1
>>1) we need the 2 servers to transfer data back and forth using SCP as a non-human user (a user than can not login direct to either server)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2008 09:49 PM
05-06-2008 09:49 PM
Re: SSH - blocking SLOGIN from another server
My first thought:
If they're using SSH keys, you could set "IgnoreRhosts yes" in /opt/ssh/etc/sshd_config file to disable the .rhosts/.shosts files.
Your users would still be able to set up SSH keys for themselves and log in using them... but you could make it more difficult (or even impossible) by setting the "AuthorizedKeysFile" option to some non-default value.
The default value is "%h/.ssh/authorized_keys". Setting it to something like "/var/sshkeys/%u/authorized_keys" and then setting restrictive permissions to /var/sshkeys hierarchy would allow you total control over who can use SSH keys and who can't.
---------
My second thought:
Note also that the AllowUsers/DenyUsers can take USER@HOST forms too, even with wildcard patterns.
The sshd_config man page says that the allow/deny directives are processed in this order: DenyUsers, AllowUsers, DenyGroups and finally AllowGroups. But it does not seem to say whether the process is stopped at the first match or not.
I cannot test at the moment, but one of the following should do the trick:
Either:
DenyUsers *@linux.box.example
AllowUsers scpuser@linux.box.example
(works if the later AllowUsers can override the first DenyUsers)
Or:
AllowUsers scpuser@linux.box.example
DenyGroups *@linux.box.example
(works if the first match wins, i.e. DenyGroups is not examined after an explicit AllowUsers is found to match)
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 04:20 AM
05-07-2008 04:20 AM
Re: SSH - blocking SLOGIN from another server
I thought that might happen. tcp wrappers is geared toward host access, but I thought you could give it a shot. Matti's answer looks like it's a winner. But you will also need to add each user that needs access via ssh to the box. You might look into the AllowGroup directive. Then you can create a group that has users that are allowed to ssh into the server. Funny how the things that seem like they should be easy can start to seem so complicated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2008 06:13 AM
05-07-2008 06:13 AM
Re: SSH - blocking SLOGIN from another server
I may just have to use the Deny but then change some our scripts so we send from these servers (instead of the Linux servers doing the sending of data).