Ms7 Search
Google 搜尋 翻譯
calendar
« 四月 2025 »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        
近期文章
文章分類
網站連結
Syndicate

« | »

ssh 設定 chroot 的方法

2015-05-27 @ 19:21 in Linux

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 的方法 | 豬窩 | 5

Hi everybody, here is an interesting article on a
student trader from the United States who made $110 million in one month and rose to prominence on Wall Street..

Feel free to repost. https://int3gr.it/ENim

作者 trading @ 10:45, 2023-01-12

ssh 設定 chroot 的方法 | 豬窩 | 5

Hi all, here is an great article on how to Explain NFTs to
Your Grandmother, in Simple Terms. Read here:. https://int3gr.it/bJFf

作者 NFT @ 11:40, 2023-01-12

ssh 設定 chroot 的方法 | 豬窩 | 5

Hi all, here is an great article on why Cryptocurrency Is Not Dead Despite the FTX Scam.
Give it some love!. https://int3gr.it/yDjm

作者 Crypto @ 01:28, 2023-01-19

ssh 設定 chroot 的方法 | 豬窩 | 5

Hi everybody, here is an fascinating article on why FTX's crash was no accident, it was a crime.

Give it some love!. https://int3gr.it/4Pri

作者 ftx @ 01:58, 2023-01-24

ssh 設定 chroot 的方法 | 豬窩 | 5

Hi everybody, here is an interesting post on Generative AI hype:
some thoughts. Read here:. https://int3gr.it/CcmP

作者 AI @ 18:47, 2023-02-03
發表迴響
 authimage