このチュートリアルに従って、SSH で Chroot を使用して刑務所を構成しました。
同じ問題を扱うStackOverflowで別の質問を見つけましたが、答えもうまくいきませんでした。
auth.log
ファイルには次のものが含まれます。
Mar 16 18:36:06 *** sshd[30509]: Accepted password for thenewone from x.x.x.x port 49583 ssh2
Mar 16 18:36:06 *** sshd[30509]: pam_unix(sshd:session): session opened for user thenewone by (uid=0)
Mar 16 18:36:07 *** sshd[30509]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
Mar 16 18:36:07 *** sshd[30509]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
Mar 16 18:36:07 *** sshd[30509]: pam_unix(sshd:session): session closed for user thenewone
私のsshd_config
ファイルには以下が含まれています:
Match User thenewone
ChrootDirectory /home/thenewone
AllowTcpForwarding no
X11Forwarding no
私の/home/thenewone
ディレクトリは所有されroot:root
ており、chrootされたシステムが含まれています(/home/thenewone/home/thenewone
所有者以外のすべてのファイルroot:root
)
接続が成功した後、単純に閉じる理由がわかりません。