ssh 設定 chroot 的方法
openssh 4.8p1以後,chroot功能已經被內置了,使用方法如下:
1.建立 chroot 環境 dir.sh
2.建立可用指令環境 cmd.sh
3.建立使用者 user.sh
4.修改 /etc/ssh/sshd_config 的設定
Match User foo
ChrootDirectory /var/chroot
也可以Match Group,舉例如下:
Match Group sftponly
PasswordAuthentication yes
AllowAgentForwarding no
AllowTcpForwarding no
ChrootDirectory /var/chroot
網上看到有加 %u => ChrootDirectory /var/chroot/%u測試結果錯誤,將 %u取消才可以
參考自 : http://blog.sina.com.cn/s/blog_6e0c0fdf01019zw5.html
迴響
ssh 設定 chroot 的方法 | 豬窩
First off I would like to say great blog! I had a quick question that I'd like
to ask if you do not mind. I was curious to find out how you center yourself and clear your mind prior
to writing. I've had a difficult time clearing my thoughts in getting my thoughts out.
I do enjoy writing however it just seems like the first
10 to 15 minutes are generally lost simply just trying to
figure out how to begin. Any suggestions or tips? Appreciate
it!
ssh 設定 chroot 的方法 | 豬窩
Outstanding quest there. What occurred after? Thanks!
ssh 設定 chroot 的方法 | 豬窩
Loving the info on this internet site, you have
done outstanding job on the articles.
ssh 設定 chroot 的方法 | 豬窩
Sweet blog! I found it while browsing on Yahoo News. Do you have any suggestions
on how to get listed in Yahoo News? I've been trying for a while but I never seem to get there!
Appreciate it
ssh 設定 chroot 的方法 | 豬窩
Hi there, just wanted to mention, I loved this article.
It was funny. Keep on posting!