<?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: chroot, sftp, authentication key generation - not working in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639265#M19892</link>
    <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;try to copy the ssh-keygen binary to users choroot/bin directory as root user and try to  run it as the required user .&lt;BR /&gt;&lt;BR /&gt;I haven't done it , you may try .&lt;BR /&gt;&lt;BR /&gt;Thx,&lt;BR /&gt;bl.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 30 Sep 2005 14:17:17 GMT</pubDate>
    <dc:creator>baiju_3</dc:creator>
    <dc:date>2005-09-30T14:17:17Z</dc:date>
    <item>
      <title>chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639262#M19889</link>
      <description>I have a RedHat server with a chroot'd user that works fine via ssh and sftp.&lt;BR /&gt;&lt;BR /&gt;When I try to create a ssh key so the I can sftp without a password it does not work.&lt;BR /&gt;&lt;BR /&gt;If I do it for a non-chroot'd user the keys work fine.&lt;BR /&gt;&lt;BR /&gt;How do I get a chroot'd user to login without a password via ssh or sftp?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 30 Sep 2005 11:24:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639262#M19889</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-09-30T11:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639263#M19890</link>
      <description>Is the user chrooted to his home directory?&lt;BR /&gt;&lt;BR /&gt;Maybe the .ssh directory and the respective contents is not found when you are working in a chroot environment.</description>
      <pubDate>Fri, 30 Sep 2005 14:00:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639263#M19890</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-09-30T14:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639264#M19891</link>
      <description>Yes the user is chrooted but I am prompted for a password.  If I remove the chroot then I am not prompted for the password.  How do I get the chroot environment to see the .ssh ?</description>
      <pubDate>Fri, 30 Sep 2005 14:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639264#M19891</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-09-30T14:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639265#M19892</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;try to copy the ssh-keygen binary to users choroot/bin directory as root user and try to  run it as the required user .&lt;BR /&gt;&lt;BR /&gt;I haven't done it , you may try .&lt;BR /&gt;&lt;BR /&gt;Thx,&lt;BR /&gt;bl.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Sep 2005 14:17:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639265#M19892</guid>
      <dc:creator>baiju_3</dc:creator>
      <dc:date>2005-09-30T14:17:17Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639266#M19893</link>
      <description>Post the output of ssh -v server, with and without chroot. Let's see if something comes out.</description>
      <pubDate>Fri, 30 Sep 2005 14:31:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639266#M19893</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-09-30T14:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639267#M19894</link>
      <description>ssh -v swohftp@chpftp01&lt;BR /&gt;OpenSSH_3.9, OpenSSL 0.9.7d 17 Mar 2004&lt;BR /&gt;HP-UX Secure Shell-A.03.91.002, HP-UX Secure Shell version&lt;BR /&gt;debug1: Reading configuration data /opt/ssh/etc/ssh_config&lt;BR /&gt;debug1: Connecting to chpftp01 [10.233.30.171] port 22.&lt;BR /&gt;debug1: Connection established.&lt;BR /&gt;debug1: identity file /home/hoev178/.ssh/id_rsa type 1&lt;BR /&gt;debug1: identity file /home/hoev178/.ssh/id_dsa type 2&lt;BR /&gt;debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9p1&lt;BR /&gt;debug1: match: OpenSSH_3.9p1 pat OpenSSH*&lt;BR /&gt;debug1: Enabling compatibility mode for protocol 2.0&lt;BR /&gt;debug1: Local version string SSH-2.0-OpenSSH_3.9&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 'chpftp01' is known and matches the RSA host key.&lt;BR /&gt;debug1: Found key in /home/hoev178/.ssh/known_hosts:36&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;&lt;BR /&gt;UNAUTHORIZED USE AND/OR ACCESS IS STRICTLY PROHIBITED&lt;BR /&gt;&lt;BR /&gt;debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;BR /&gt;debug1: Next authentication method: publickey&lt;BR /&gt;debug1: Offering public key: /home/hoev178/.ssh/id_rsa&lt;BR /&gt;debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;BR /&gt;debug1: Offering public key: /home/hoev178/.ssh/id_dsa&lt;BR /&gt;debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;BR /&gt;debug1: Next authentication method: password&lt;BR /&gt;swohftp@chpftp01's password: &lt;BR /&gt;</description>
      <pubDate>Fri, 30 Sep 2005 14:59:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639267#M19894</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-09-30T14:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639268#M19895</link>
      <description>From the client side, nothing wrong can be seen.&lt;BR /&gt;&lt;BR /&gt;Try debugging from the server side.&lt;BR /&gt;&lt;BR /&gt;Stop the sshd service:&lt;BR /&gt;&lt;BR /&gt;service sshd stop&lt;BR /&gt;&lt;BR /&gt;Start the sshd daemon:&lt;BR /&gt;&lt;BR /&gt;/usr/sbin/sshd -D -d -f /etc/ssh/sshd_config&lt;BR /&gt;&lt;BR /&gt;Start the connection. Try to see if the server use the public key for the user.</description>
      <pubDate>Fri, 30 Sep 2005 15:29:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639268#M19895</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-09-30T15:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639269#M19896</link>
      <description>I just acts as if it cannot see the keys in the .ssh directory.&lt;BR /&gt;&lt;BR /&gt;????</description>
      <pubDate>Fri, 30 Sep 2005 15:46:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639269#M19896</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-09-30T15:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639270#M19897</link>
      <description>I think that the problem could be the AuthorizedKeysFile parameter. Maybe is trying to find the key in the user home, but, when chrooted, the user home is the /.&lt;BR /&gt;&lt;BR /&gt;Try changing the AuthorizedKeysFile parameter to /.ssh/authorized_keys.&lt;BR /&gt;&lt;BR /&gt;Next, if that works, maybe you will need to setup differents sshd configuration for chrooted and no chrooted users, listening on different ports.</description>
      <pubDate>Fri, 30 Sep 2005 16:31:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639270#M19897</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-09-30T16:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639271#M19898</link>
      <description>One more question. Are you using the sshd chroot patch or the pam chroot module to setup the chroot jail?&lt;BR /&gt;&lt;BR /&gt;I would like to do some testings to reproduce your environment.</description>
      <pubDate>Fri, 30 Sep 2005 16:34:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639271#M19898</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-09-30T16:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639272#M19899</link>
      <description>Changing the location of the keys file did not work.&lt;BR /&gt;&lt;BR /&gt;I modified the /etc/pam.d/sshd file:&lt;BR /&gt;&lt;BR /&gt;#%PAM-1.0&lt;BR /&gt;auth       required     pam_stack.so service=system-auth&lt;BR /&gt;auth       required     pam_nologin.so&lt;BR /&gt;account    required     pam_stack.so service=system-auth&lt;BR /&gt;password   required     pam_stack.so service=system-auth&lt;BR /&gt;session    required     pam_stack.so service=system-auth&lt;BR /&gt;session    required     pam_chroot.so&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 08:25:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639272#M19899</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-10-03T08:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639273#M19900</link>
      <description>Good and bad news.&lt;BR /&gt;&lt;BR /&gt;Good news, I tested and the sshd with chroot and public keys worked.&lt;BR /&gt;&lt;BR /&gt;Bad news, I don't know why it does not works for you.&lt;BR /&gt;&lt;BR /&gt;What I did:&lt;BR /&gt;&lt;BR /&gt;OS Fedora Core 4.&lt;BR /&gt;&lt;BR /&gt;File /etc/pam.d/sshd&lt;BR /&gt;&lt;BR /&gt;Added &lt;BR /&gt;&lt;BR /&gt;session required pam_chroot.so debug&lt;BR /&gt;&lt;BR /&gt;File /etc/security/chroot.conf&lt;BR /&gt;&lt;BR /&gt;Added&lt;BR /&gt;&lt;BR /&gt;iferreira /home/iferreira/chroot&lt;BR /&gt;&lt;BR /&gt;File&lt;BR /&gt;&lt;BR /&gt;/etc/ssh/sshd_config&lt;BR /&gt;&lt;BR /&gt;Added&lt;BR /&gt;&lt;BR /&gt;UsePAM yes&lt;BR /&gt;UsePrivilegeSeparation no&lt;BR /&gt;&lt;BR /&gt;Using ldd, I created the a minimal chroot environment, all files owned by root.root and perm 755&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/home/iferreira/chroot &lt;BR /&gt;/home/iferreira/chroot/bin&lt;BR /&gt;/home/iferreira/chroot/bin/bash&lt;BR /&gt;/home/iferreira/chroot/bin/ls&lt;BR /&gt;/home/iferreira/chroot/lib/ld-linux.so.2&lt;BR /&gt;/home/iferreira/chroot/lib/libacl.so.1&lt;BR /&gt;/home/iferreira/chroot/lib/libattr.so.1&lt;BR /&gt;/home/iferreira/chroot/lib/libc.so.6&lt;BR /&gt;/home/iferreira/chroot/lib/libdl.so.2&lt;BR /&gt;/home/iferreira/chroot/lib/libpthread.so.0&lt;BR /&gt;/home/iferreira/chroot/lib/librt.so.1&lt;BR /&gt;/home/iferreira/chroot/lib/libselinux.so.1&lt;BR /&gt;/home/iferreira/chroot/lib/libtermcap.so.2&lt;BR /&gt;/home/iferreira/chroot/home/iferreira (iferreira.iferreira 755)&lt;BR /&gt;&lt;BR /&gt;In another system, created the keys using:&lt;BR /&gt;&lt;BR /&gt;ssh-keygen -t dsa&lt;BR /&gt;&lt;BR /&gt;Copied the id_dsa.pub file to /home/iferreira/.ssh/authorized_keys:&lt;BR /&gt;&lt;BR /&gt;/home/iferreira/.ssh (iferreira.iferreira 700)&lt;BR /&gt;/home/iferreira/.ssh/authorized_keys (iferreira.iferreira 600)&lt;BR /&gt;&lt;BR /&gt;As you can note, the key was copied to the real HOME, not the chrooted home directory.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tested and worked. What does not works is connecting to the system using ssh -l iferreira remote_host. You need to connect directly using the iferreira user. That means, connect without using the -l option, otherwise the password will be prompted.</description>
      <pubDate>Mon, 03 Oct 2005 15:26:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639273#M19900</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-03T15:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639274#M19901</link>
      <description>Did it work with sftp and scp?</description>
      <pubDate>Mon, 03 Oct 2005 15:41:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639274#M19901</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-10-03T15:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639275#M19902</link>
      <description>I quick try did not worked. sftp closes the connection and scp respond with unknown user error (even when I configured a fake passwd file in the chrooted environment).&lt;BR /&gt;&lt;BR /&gt;Maybe there are more files/libraries that must to be copied. It's a hard work with shared libraries.&lt;BR /&gt;&lt;BR /&gt;I think that using the chroot patch for sshd will be easier.</description>
      <pubDate>Mon, 03 Oct 2005 16:27:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639275#M19902</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-03T16:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639276#M19903</link>
      <description>I am not fimiliar with the "chroot patch".  Can I get that from RedHat?</description>
      <pubDate>Tue, 04 Oct 2005 06:32:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639276#M19903</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-10-04T06:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639277#M19904</link>
      <description>I created the same user id on both server and client and put the authorized_keys file in the /home/userid/.ssh vs. the chrooted home dir on the server.  I can now sftp and without a password and be chrooted.  &lt;BR /&gt;&lt;BR /&gt;The scp doesnot work but I can work with the sftp.&lt;BR /&gt;&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;&lt;BR /&gt;The scp gives a unknow user id kind of error.  I tried giving the user the same id number of both systems and placing key files on both sides but it still doesn't work.  I will use sftp - good for now.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 07:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639277#M19904</guid>
      <dc:creator>Jeff Hoevenaar</dc:creator>
      <dc:date>2005-10-04T07:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: chroot, sftp, authentication key generation - not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639278#M19905</link>
      <description>You can get it from here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://chrootssh.sourceforge.net/index.php" target="_blank"&gt;http://chrootssh.sourceforge.net/index.php&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;With all instructions to use.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Oct 2005 07:41:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/chroot-sftp-authentication-key-generation-not-working/m-p/3639278#M19905</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-04T07:41:53Z</dc:date>
    </item>
  </channel>
</rss>

