{"id":9246,"date":"2021-01-31T20:55:08","date_gmt":"2021-01-31T12:55:08","guid":{"rendered":"https:\/\/jpuyy.com\/?p=9246"},"modified":"2021-01-31T20:55:08","modified_gmt":"2021-01-31T12:55:08","slug":"sftp-chroot","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=9246","title":{"rendered":"sftp chroot"},"content":{"rendered":"<pre>\r\n# cat \/etc\/ssh\/sshd_config  | grep -vE '^#|^$'\r\nAuthorizedKeysCommand \/usr\/bin\/google_authorized_keys\r\nAuthorizedKeysCommandUser root\r\nHostKey \/etc\/ssh\/ssh_host_rsa_key\r\nHostKey \/etc\/ssh\/ssh_host_ecdsa_key\r\nHostKey \/etc\/ssh\/ssh_host_ed25519_key\r\nSyslogFacility AUTHPRIV\r\nPermitRootLogin no\r\nAuthorizedKeysFile      .ssh\/authorized_keys\r\nPasswordAuthentication no\r\nChallengeResponseAuthentication no\r\nGSSAPIAuthentication yes\r\nGSSAPICleanupCredentials no\r\nUsePAM yes\r\nX11Forwarding yes\r\nClientAliveInterval 420\r\nUseDNS no\r\nAcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES\r\nAcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT\r\nAcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE\r\nAcceptEnv XMODIFIERS\r\nSubsystem sftp internal-sftp\r\nMatch User user1\r\n   ChrootDirectory \/data\/chroot\/%u\r\n   ForceCommand internal-sftp\r\n   AllowTcpForwarding no\r\n   X11Forwarding no\r\n<\/pre>\n<p>https:\/\/serverfault.com\/a\/656756<\/p>\n","protected":false},"excerpt":{"rendered":"<p># cat \/etc\/ssh\/sshd_config | grep -vE &#8216;^#|^$&#8217; AuthorizedKeysCommand \/usr\/bin\/google_authorized_keys AuthorizedKeysCommandUser root HostKey \/etc\/ssh\/ssh_host_rsa_key HostKey \/etc\/ssh\/ssh_host_ecdsa_key HostKey \/etc\/ssh\/ssh_host_ed25519_key SyslogFacility AUTHPRIV PermitRootLogin no AuthorizedKeysFile .ssh\/authorized_keys PasswordAuthentication no ChallengeResponseAuthentication no GSSAPIAuthentication yes GSSAPICleanupCredentials no UsePAM yes X11Forwarding yes ClientAliveInterval 420 UseDNS no AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-9246","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/9246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9246"}],"version-history":[{"count":1,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/9246\/revisions"}],"predecessor-version":[{"id":9247,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/9246\/revisions\/9247"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9246"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9246"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}