<?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: Trusted mode and only ssh certificates in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4839353#M732001</link>
    <description>&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;that would be a more ideal method, however, I can't find a "supported" methode to do this when you have a trusted system. I guess you could:&lt;/P&gt;&lt;P&gt;1) Hacb the tcb files for the useracounts directly and change the hash&lt;/P&gt;&lt;P&gt;2) Use /usr/sam/lbin/usermod.sam -p "NP" user&lt;/P&gt;&lt;P&gt;But I still can't find any doco that NP is a support/proper way of doing it, do you know about a manpage/doco that verifies this around trusted systems?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk&amp;amp;Regards,&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jul 2011 02:13:28 GMT</pubDate>
    <dc:creator>JohnFjeldberg</dc:creator>
    <dc:date>2011-07-26T02:13:28Z</dc:date>
    <item>
      <title>Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4833199#M731996</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm trying to set up a particular application user account to only accept connection using ssh keys, but not password, similar to "&amp;nbsp;"PermitRootLogin without-password"﻿, but for normal users. System is trusted, and when I try #passwd -l &amp;lt;account&amp;gt; the key stops working as well... I'm thinking of replacing the hash in the tcb file with some garbish, but I was hoping to get around it in a better way.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;System is:&lt;/P&gt;&lt;P&gt;HP-UX 11.23 IA&lt;/P&gt;&lt;P&gt;OpenSSH_5.3p1+sftpfilecontrol-v1.3-hpn13v5, OpenSSL 0.9.8l 5 Nov 2009&lt;BR /&gt;HP-UX Secure Shell-A.05.30.008, HP-UX Secure Shell version&lt;BR /&gt;﻿&lt;/P&gt;&lt;P&gt;Thansk&amp;amp;Regards,&lt;/P&gt;&lt;P&gt;JF&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 06:54:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4833199#M731996</guid>
      <dc:creator>JohnFjeldberg</dc:creator>
      <dc:date>2011-07-20T06:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4833611#M731997</link>
      <description>&lt;P&gt;Please set the foloowing in sshd_config file and restart sshd.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PubkeyAuthAllowUsers&amp;nbsp; user_x&lt;BR /&gt;PasswordAuthDenyUsers user_x&lt;BR /&gt;ChallRespAuthDenyUsers&amp;nbsp; [pam] user_x&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 12:15:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4833611#M731997</guid>
      <dc:creator>Turgay Cavdar</dc:creator>
      <dc:date>2011-07-20T12:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4833615#M731998</link>
      <description>&lt;P&gt;You need to generate public key. For an example if you are trying to login from serverA to serverB then you need to generate a public key in serverA and export thaa key into serverB authorized_keys file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;1. Login to serverA using particular application user id&lt;/P&gt;&lt;P&gt;2. Generate public key ($ ssh-kegen -t rsa&amp;nbsp; OR&amp;nbsp; $ ssh-keygen -t dsa)&lt;/P&gt;&lt;P&gt;3. ssh-copy-id -i ~/.ssh/id_rsa.pub &lt;A target="_blank" href="mailto:user@serverB"&gt;user@serverB&lt;/A&gt; OR ssh-copy-id -i ~/.ssh/id_dsa.pub &lt;A target="_blank" href="mailto:user@serverB"&gt;user@serverB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;scp ~/.ssh/id_rsa.pub user&lt;A target="_blank" href="mailto:user@serverB:/home/user/.ssh/authorized_keys"&gt;@serverB:/home/user/.ssh/authorized_keys&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please take a backup of existing authorized_keys file backup in serverB before proceeding&lt;/P&gt;&lt;P&gt;4. Check with some simple command like $ ssh serverB hostname (it will not ask for password)&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2011 12:19:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4833615#M731998</guid>
      <dc:creator>Arunabha Banerjee</dc:creator>
      <dc:date>2011-07-20T12:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4838007#M731999</link>
      <description>&lt;P&gt;Thanks Turgay, that's exactly what I needed. Strangely they have forgotten to mention this in the man pages, but at least it is in their "HP-UX Secure Shell Getting Started Guide" . Your response is much appreciated.&lt;/P&gt;&lt;P&gt;BTW, might be worth mentioning that you have to tweak "UsePAM or ChallengeResponseAuthentication" to get the desired behaviour.&lt;BR /&gt;﻿&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2011 23:29:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4838007#M731999</guid>
      <dc:creator>JohnFjeldberg</dc:creator>
      <dc:date>2011-07-24T23:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4839023#M732000</link>
      <description>&lt;P&gt;Hey;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're interested in *completely* removing password authentication from a user, you can update the encrypted hash with NP (no password) or some other ascii less than 13 characters and also is not LK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The rason that ssh stopped working after the "passwd -l command" is that ssh honors locked accounts. &amp;nbsp;If the account is locked, you can't get into it via ssh either. &amp;nbsp;Another side affect of locking an account is the user's cron will stop working as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NP works because there is no password that will get hashed through the crypt function to NP. &amp;nbsp;This removes any possibility of password based authentication while still allowing access via ssh/pka and keeping the cron jobs running. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One added benefit is you don't have to keep editing the sshd_config file for users coming in or leaving, if that's an issue. &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sshd approach listed above will require public key authentiaciton; however, users will still be able to telnet, ftp, or rlogin assuming those protocols are still enabled. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Last point: if you do go the NP encrypted passwd hash route, make sure you remove any entries associated with password aging.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug O'Leary&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2011 17:08:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4839023#M732000</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2011-07-25T17:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4839353#M732001</link>
      <description>&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;that would be a more ideal method, however, I can't find a "supported" methode to do this when you have a trusted system. I guess you could:&lt;/P&gt;&lt;P&gt;1) Hacb the tcb files for the useracounts directly and change the hash&lt;/P&gt;&lt;P&gt;2) Use /usr/sam/lbin/usermod.sam -p "NP" user&lt;/P&gt;&lt;P&gt;But I still can't find any doco that NP is a support/proper way of doing it, do you know about a manpage/doco that verifies this around trusted systems?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thansk&amp;amp;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2011 02:13:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4839353#M732001</guid>
      <dc:creator>JohnFjeldberg</dc:creator>
      <dc:date>2011-07-26T02:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4843181#M732002</link>
      <description>&lt;P&gt;Hey;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the delay in answering. &amp;nbsp;I was expecgint my rss reader to let me know when there were new responses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is no documentation for this action - it relies on logic and an understanding of the system operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, if you lock an account it will either put 'LK' or a '*' in the encrypted password field. &amp;nbsp;The reason this works is that an encrypted password hash is 13 characters long - always. &amp;nbsp;Regardless of how many or how few characters you type as a password, the encrypted hash will be 13 characters long.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both LK and * have a special meaning to the account management process - they mean the account is administratively locked. &amp;nbsp;If an account is locked, it won't allow you to log in (obviously) but will also prevent the account's cron jobs from running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the next thing is to come up with an 'encrypted password' that won't resolve to anything and doesn't mean anything to the account management process: hence 'NP'. &amp;nbsp;That prevents any password based authentication, but enables shh/pka access and keeps the cron jobs running.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Personally, I just update the encyrpted hash with a perl oneliner. &amp;nbsp;We're using the shadow passwd file so it's a bit easier, but it'd still be pretty easy for tcb:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;awk -F: '$3 &amp;gt; 100 {print $1}' /etc/passwd | while read user&lt;/P&gt;&lt;P&gt;do&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; c=$(echo ${user} | cut -c 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;p=/tcb/files/auth/$[c}/${user}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;[[ ! -f ${p} ]] &amp;amp;&amp;amp; echo "${user} missing tcb file ${p} || \&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; perl -i -ple 's/.../.../g' ${p}&lt;/P&gt;&lt;P&gt;done&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you'll have to work out the search/replace on your own as it's been *years* since I've seen a tcb file... Been working with a bunch of previous solaris admin managers who insisted that we use the shadow passwd patch even before it was very useful..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Doug O'Leary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2011 13:28:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/4843181#M732002</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2011-07-28T13:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trusted mode and only ssh certificates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/5287263#M732003</link>
      <description>Thanks Doug, your reply is much appreciated!</description>
      <pubDate>Mon, 01 Aug 2011 07:43:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/trusted-mode-and-only-ssh-certificates/m-p/5287263#M732003</guid>
      <dc:creator>JohnFjeldberg</dc:creator>
      <dc:date>2011-08-01T07:43:17Z</dc:date>
    </item>
  </channel>
</rss>

