<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SSH - blocking SLOGIN from another server in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192727#M733722</link>
    <description>Anthony,&lt;BR /&gt;&lt;BR /&gt;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.</description>
    <pubDate>Wed, 07 May 2008 11:20:25 GMT</pubDate>
    <dc:creator>Court Campbell</dc:creator>
    <dc:date>2008-05-07T11:20:25Z</dc:date>
    <item>
      <title>SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192714#M733709</link>
      <description>We have HP-UX 11.23 and a Redhat Linux server talking to each other though SSH.   The HP-UX server sends information over to the Linux server through SCP as a specific (non-human) user.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;We tried the AllowUsers option in sshd_config, but this ended up also blocking the direct logins.&lt;BR /&gt;&lt;BR /&gt;So, to summarize:&lt;BR /&gt;&lt;BR /&gt;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)&lt;BR /&gt;2) we want users to login direct to the HP-UX server&lt;BR /&gt;3)we do not want users to be able to SLOGIN from the Linux server over to the HP-UX server&lt;BR /&gt;&lt;BR /&gt;Thanks for any advice!</description>
      <pubDate>Tue, 06 May 2008 15:48:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192714#M733709</guid>
      <dc:creator>Anthony_141</dc:creator>
      <dc:date>2008-05-06T15:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192715#M733710</link>
      <description>Many things you can do.&lt;BR /&gt;&lt;BR /&gt;Enable TCP-WRAPPERs.  edit hosts.deny file with IP of linux server&lt;BR /&gt;&lt;BR /&gt;If it were telnet I would say to modify the /var/adm/inetd.sec &lt;BR /&gt;&lt;BR /&gt;You can play with IPsec&lt;BR /&gt;&lt;BR /&gt;You can modify the sshd_config and maybe use #HostbasedAuthDenyUsers (not sure about this one )&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 15:57:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192715#M733710</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-05-06T15:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192716#M733711</link>
      <description>Depending on your version of ssh on hp-ux iot may already have tcp wrappers. Try:&lt;BR /&gt;&lt;BR /&gt;# what /usr/sbin/sshd&lt;BR /&gt;&lt;BR /&gt;and look for tcp wrappers.</description>
      <pubDate>Tue, 06 May 2008 16:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192716#M733711</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-05-06T16:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192717#M733712</link>
      <description>Yes, we have TCP-Wrappers enabled.</description>
      <pubDate>Tue, 06 May 2008 16:07:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192717#M733712</guid>
      <dc:creator>Anthony_141</dc:creator>
      <dc:date>2008-05-06T16:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192718#M733713</link>
      <description>I am still trying to wrap my head around this. I do not think tcp wrappers is going to help since it is more at the host level. And if you deny/allow users via AllowUsers/DenyUsers then that affects the ability even when not connected through the linux box. I was thinking you could turn of password authentication. So then you would have to use some other auth besides passwords, ie, your rsa setup. I guess you could try&lt;BR /&gt;&lt;BR /&gt;PasswordAuthentication no&lt;BR /&gt;&lt;BR /&gt;If that still allows passwords you can either update ssh, or change&lt;BR /&gt;&lt;BR /&gt;UsePAM no&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 16:24:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192718#M733713</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-05-06T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192719#M733714</link>
      <description>/etc/hosts.deny with the following will block ssh from linux_host&lt;BR /&gt;&lt;BR /&gt;sshd : linux_host : DENY&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 16:30:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192719#M733714</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-05-06T16:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192720#M733715</link>
      <description>Tim,&lt;BR /&gt;&lt;BR /&gt;if he blocks the host. then his process that copies files from the linux server to the hpux server will not work.</description>
      <pubDate>Tue, 06 May 2008 17:02:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192720#M733715</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-05-06T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192721#M733716</link>
      <description>I am not sure if this will work, but I guess you could try this in /etc/hosts.deny&lt;BR /&gt;&lt;BR /&gt;sshd: linux_host EXCEPT user@linux_host</description>
      <pubDate>Tue, 06 May 2008 17:08:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192721#M733716</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-05-06T17:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192722#M733717</link>
      <description>That blocked the entire server - evidently the "EXCEPT" doesn't have any effect.&lt;BR /&gt;&lt;BR /&gt;The message I got was:&lt;BR /&gt;&lt;BR /&gt;ssh_exchange_identification: Connection closed by remote host&lt;BR /&gt;lost connection&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 17:42:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192722#M733717</guid>
      <dc:creator>Anthony_141</dc:creator>
      <dc:date>2008-05-06T17:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192723#M733718</link>
      <description>How about starting a second sshd process on the HP box on a different port (with a different config file). Then block the linux server on the standard sshd and allow only the automated-SCP user on the second port. There is some work that needs to be done in the second config file to separate the port, pidfile, keysfile etc. I have not tried it but I think it is doable.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 18:31:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192723#M733718</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-05-06T18:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192724#M733719</link>
      <description>I actually verified this because it got me going. The important changes are a different config file, with a different port and a PID file. The keyfile location changes are optional.&lt;BR /&gt;&lt;BR /&gt;The PID file is important because it is used in the RC start/stop sequencer.&lt;BR /&gt;&lt;BR /&gt;You can also create separate /etc/rc.config.d/sshd and /sbin/init.d/secsh files and rc?.d links</description>
      <pubDate>Tue, 06 May 2008 18:56:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192724#M733719</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2008-05-06T18:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192725#M733720</link>
      <description>Thanks for the correction Court.&lt;BR /&gt;&lt;BR /&gt;I missed the "back and forth" parth of item 1&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;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)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 May 2008 19:01:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192725#M733720</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-05-06T19:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192726#M733721</link>
      <description>How are the non-human SCP transfers set up? Do they use SSH keys, or .rhosts/.shosts files?&lt;BR /&gt;&lt;BR /&gt;My first thought:&lt;BR /&gt;&lt;BR /&gt;If they're using SSH keys, you could set "IgnoreRhosts yes" in /opt/ssh/etc/sshd_config file to disable the .rhosts/.shosts files. &lt;BR /&gt;&lt;BR /&gt;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. &lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;---------&lt;BR /&gt;My second thought:&lt;BR /&gt;&lt;BR /&gt;Note also that the AllowUsers/DenyUsers can take USER@HOST forms too, even with wildcard patterns.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;I cannot test at the moment, but one of the following should do the trick:&lt;BR /&gt;&lt;BR /&gt;Either:&lt;BR /&gt;DenyUsers *@linux.box.example&lt;BR /&gt;AllowUsers scpuser@linux.box.example&lt;BR /&gt;(works if the later AllowUsers can override the first DenyUsers)&lt;BR /&gt;&lt;BR /&gt;Or:&lt;BR /&gt;AllowUsers scpuser@linux.box.example&lt;BR /&gt;DenyGroups *@linux.box.example&lt;BR /&gt;(works if the first match wins, i.e. DenyGroups is not examined after an explicit AllowUsers is found to match)&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Wed, 07 May 2008 04:49:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192726#M733721</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2008-05-07T04:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192727#M733722</link>
      <description>Anthony,&lt;BR /&gt;&lt;BR /&gt;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.</description>
      <pubDate>Wed, 07 May 2008 11:20:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192727#M733722</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-05-07T11:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: SSH - blocking SLOGIN from another server</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192728#M733723</link>
      <description>Looks like if you use the Deny options that the Allowed are ignored.&lt;BR /&gt;&lt;BR /&gt;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).</description>
      <pubDate>Wed, 07 May 2008 13:13:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ssh-blocking-slogin-from-another-server/m-p/4192728#M733723</guid>
      <dc:creator>Anthony_141</dc:creator>
      <dc:date>2008-05-07T13:13:18Z</dc:date>
    </item>
  </channel>
</rss>

