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

Hi, i believe that i saw you visited my website
so i got here to return the prefer?.I'm attempting to find
things to enhance my web site!I suppose its adequate to make use of some of your concepts!!

作者 plenty of fish dating site @ 00:57, 2019-11-13

ssh 設定 chroot 的方法 | 豬窩

I delight in, result in I found exactly what I was taking a look for.
You have ended my four day lengthy hunt! God Bless you man. Have a nice day.
Bye

作者 what coconut oil @ 01:17, 2019-11-16

ssh 設定 chroot 的方法 | 豬窩

Hi there, I check your blog daily. Your humoristic style is witty, keep doing
what you're doing!

作者 http://tinyurl.com/ @ 11:51, 2019-11-22

ssh 設定 chroot 的方法 | 豬窩

Hello! Do you use Twitter? I'd like to follow you if
that would be okay. I'm undoubtedly enjoying your blog and look forward
to new posts.

作者 g @ 18:49, 2020-06-15

ssh 設定 chroot 的方法 | 豬窩

Hi there, i read your blog from time to time and i own a
similar one and i was just wondering if you get
a lot of spam feedback? If so how do you protect against it, any plugin or anything you can suggest?
I get so much lately it's driving me crazy so any support is very much appreciated.

作者 g @ 17:14, 2020-06-16
發表迴響
 authimage