<?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: Stop ssh root login in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016100#M427482</link>
    <description>Apologies for not being clearer in my original question. &lt;BR /&gt;&lt;BR /&gt;What I trying to achieve was not allowing direct root logins to a system and force a su, (utilizing EnforceSecureTTY) but I would like to execute the scp command as root from HostA to HostB and vice versa therefore leaving PermitRootLogin to be yes. &lt;BR /&gt;&lt;BR /&gt;From what I understood from the material I have looked at, this should be the case with my YES YES config. At the moment Im able to scp and also login directly as root, which I wish to avoid.&lt;BR /&gt;</description>
    <pubDate>Tue, 28 Nov 2006 23:23:36 GMT</pubDate>
    <dc:creator>John Mak</dc:creator>
    <dc:date>2006-11-28T23:23:36Z</dc:date>
    <item>
      <title>Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016095#M427477</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I'm currently having trouble with securing root login after installing HP-UX Secure Shell A.04.30.014&lt;BR /&gt;&lt;BR /&gt;I believe that I have setup the /opt/ssh/etc/sshd_config file correctly with the bellow config.&lt;BR /&gt;&lt;BR /&gt;hostA /opt/ssh/etc #&lt;BR /&gt;hostA /opt/ssh/etc # grep EnforceSecureTTY sshd_config&lt;BR /&gt;EnforceSecureTTY yes&lt;BR /&gt;hostA /opt/ssh/etc # grep PermitRootLogin sshd_config&lt;BR /&gt;PermitRootLogin yes&lt;BR /&gt;# "PermitRootLogin without-password". If you just want the PAM account and&lt;BR /&gt;hostA /opt/ssh/etc # cat /etc/securetty&lt;BR /&gt;console&lt;BR /&gt;hostA /opt/ssh/etc #&lt;BR /&gt;&lt;BR /&gt;Denying Telnet connection is working fine. In the current state I’m still able to ssh using the root login, as can be seen bellow&lt;BR /&gt;&lt;BR /&gt;hostB /root/.ssh # ssh -v root@hostA&lt;BR /&gt;OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005&lt;BR /&gt;HP-UX Secure Shell-A.04.30.014, HP-UX Secure Shell version&lt;BR /&gt;debug1: Reading configuration data /opt/ssh/etc/ssh_config&lt;BR /&gt;debug1: Connecting to hostA [X.X.X.X] port 22.&lt;BR /&gt;debug1: Connection established.&lt;BR /&gt;debug1: permanently_set_uid: 0/3&lt;BR /&gt;debug1: identity file /root/.ssh/id_rsa type 1&lt;BR /&gt;debug1: identity file /root/.ssh/id_dsa type -1&lt;BR /&gt;debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2-hpn&lt;BR /&gt;debug1: match: OpenSSH_4.3p2-hpn pat OpenSSH*&lt;BR /&gt;debug1: Enabling compatibility mode for protocol 2.0&lt;BR /&gt;debug1: Local version string SSH-2.0-OpenSSH_4.3p2-hpn&lt;BR /&gt;debug1: SSH2_MSG_KEXINIT sent&lt;BR /&gt;debug1: SSH2_MSG_KEXINIT received&lt;BR /&gt;debug1: kex: server-&amp;gt;client aes128-cbc hmac-md5 none&lt;BR /&gt;debug1: kex: client-&amp;gt;server aes128-cbc hmac-md5 none&lt;BR /&gt;debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&amp;lt;1024&amp;lt;8192) sent&lt;BR /&gt;debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP&lt;BR /&gt;debug1: SSH2_MSG_KEX_DH_GEX_INIT sent&lt;BR /&gt;debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY&lt;BR /&gt;debug1: Host 'hostA' is known and matches the RSA host key.&lt;BR /&gt;debug1: Found key in /root/.ssh/known_hosts:1&lt;BR /&gt;debug1: ssh_rsa_verify: signature correct&lt;BR /&gt;debug1: SSH2_MSG_NEWKEYS sent&lt;BR /&gt;debug1: expecting SSH2_MSG_NEWKEYS&lt;BR /&gt;debug1: SSH2_MSG_NEWKEYS received&lt;BR /&gt;debug1: SSH2_MSG_SERVICE_REQUEST sent&lt;BR /&gt;debug1: SSH2_MSG_SERVICE_ACCEPT received&lt;BR /&gt;debug1: Authentications that can continue: publickey,password,keyboard-interactive&lt;BR /&gt;debug1: Next authentication method: publickey&lt;BR /&gt;debug1: Offering public key: /root/.ssh/id_rsa&lt;BR /&gt;debug1: Authentications that can continue: publickey,password,keyboard-interactive&lt;BR /&gt;debug1: Trying private key: /root/.ssh/id_dsa&lt;BR /&gt;debug1: Next authentication method: keyboard-interactive&lt;BR /&gt;Password:&lt;BR /&gt;debug1: Authentication succeeded (keyboard-interactive).&lt;BR /&gt;debug1: channel 0: new [client-session]&lt;BR /&gt;debug1: Entering interactive session.&lt;BR /&gt;Last   successful login for root: Wed Nov 29 11:32:11 EST-10EDT 2006&lt;BR /&gt;Last unsuccessful login for root: NEVER&lt;BR /&gt;Last login: Wed Nov 29 11:32:11 2006 from hostB.towerlife&lt;BR /&gt;&lt;BR /&gt;hostA /root #&lt;BR /&gt;hostA /root #&lt;BR /&gt;hostA /root #&lt;BR /&gt;hostA /root #&lt;BR /&gt;logout&lt;BR /&gt;debug1: client_input_channel_req: channel 0 rtype exit-status reply 0&lt;BR /&gt;debug1: channel 0: free: client-session, nchannels 1&lt;BR /&gt;Connection to hostA closed.&lt;BR /&gt;debug1: Transferred: stdin 0, stdout 0, stderr 32 bytes in 174.8 seconds&lt;BR /&gt;debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.2&lt;BR /&gt;debug1: Exit status 0&lt;BR /&gt;hostB /root/.ssh #&lt;BR /&gt;&lt;BR /&gt;I have had a look around and can not see the source of the problem. &lt;BR /&gt;&lt;BR /&gt;Any help or pointing me in the right direction would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 20:00:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016095#M427477</guid>
      <dc:creator>John Mak</dc:creator>
      <dc:date>2006-11-28T20:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016096#M427478</link>
      <description>Change the line:&lt;BR /&gt;&lt;BR /&gt;PermitRootLogin yes&lt;BR /&gt;&lt;BR /&gt;to:&lt;BR /&gt;&lt;BR /&gt;PermitRootLogin no&lt;BR /&gt;&lt;BR /&gt;Then stop and restart SSH.&lt;BR /&gt;&lt;BR /&gt;# /sbin/init.d/secsh stop&lt;BR /&gt;&lt;BR /&gt;# /sbin/init.d/secsh start&lt;BR /&gt;&lt;BR /&gt;You will then NOT be allowed to ssh as root.</description>
      <pubDate>Tue, 28 Nov 2006 20:53:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016096#M427478</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-11-28T20:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016097#M427479</link>
      <description>PermitRootLogin no #### Thats all you willl need and a restart to sshd.</description>
      <pubDate>Tue, 28 Nov 2006 20:55:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016097#M427479</guid>
      <dc:creator>KapilRaj</dc:creator>
      <dc:date>2006-11-28T20:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016098#M427480</link>
      <description>According to the link &lt;A href="http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000082022499" target="_blank"&gt;http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&amp;amp;docId=200000082022499&lt;/A&gt; And HP-UX Secure Shell Getting Started, if I set EnforceSecureTTY and PermitRootLogin to yes I should get the following result:&lt;BR /&gt;&lt;BR /&gt;SSH A.04.20 Behaviour&lt;BR /&gt;Host login will be allowed only for those root users whose pty's are listed in the /etc/securetty file&lt;BR /&gt;Hostcommand execution will be allowed for all root users (independent of /etc/securetty)&lt;BR /&gt;&lt;BR /&gt;scp and  sftp A.04.20 Behaviour&lt;BR /&gt;scp and sftp execution will be allowed for all root users regardless of /etc/securetty&lt;BR /&gt;&lt;BR /&gt;This combination (currently in force now) should have the desired result I wish to achieve. &lt;BR /&gt;&lt;BR /&gt;I have considered setting PermitRootLogin to no but this would not be a practical solution for my situation.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 21:19:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016098#M427480</guid>
      <dc:creator>John Mak</dc:creator>
      <dc:date>2006-11-28T21:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016099#M427481</link>
      <description>I guess I'm not clear on what EXACTLY you are trying to accomplish then.&lt;BR /&gt;&lt;BR /&gt;For what you initially stated initially, setting PermitRootLogin to no is the way to go.&lt;BR /&gt;&lt;BR /&gt;If there are other details you haven't stated, then those would be helpful to us to help you further.</description>
      <pubDate>Tue, 28 Nov 2006 22:26:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016099#M427481</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-11-28T22:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016100#M427482</link>
      <description>Apologies for not being clearer in my original question. &lt;BR /&gt;&lt;BR /&gt;What I trying to achieve was not allowing direct root logins to a system and force a su, (utilizing EnforceSecureTTY) but I would like to execute the scp command as root from HostA to HostB and vice versa therefore leaving PermitRootLogin to be yes. &lt;BR /&gt;&lt;BR /&gt;From what I understood from the material I have looked at, this should be the case with my YES YES config. At the moment Im able to scp and also login directly as root, which I wish to avoid.&lt;BR /&gt;</description>
      <pubDate>Tue, 28 Nov 2006 23:23:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016100#M427482</guid>
      <dc:creator>John Mak</dc:creator>
      <dc:date>2006-11-28T23:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Stop ssh root login</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016101#M427483</link>
      <description>?</description>
      <pubDate>Sun, 03 Dec 2006 18:20:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/stop-ssh-root-login/m-p/5016101#M427483</guid>
      <dc:creator>John Mak</dc:creator>
      <dc:date>2006-12-03T18:20:55Z</dc:date>
    </item>
  </channel>
</rss>

