Re: [問題] sftp

看板Linux作者時間15年前 (2010/11/18 11:32), 編輯推噓1(103)
留言4則, 3人參與, 最新討論串2/2 (看更多)
※ 引述《godman362.bbs@ptt.cc (卯)》之銘言: > 請教一下,目前手上有一台主機系統是Ubuntu 10.04 > 想要建一個公用帳號給所有人 上傳/下載 實驗室資料用途 > 並不想讓他們登入主機,也就是不開ssh的登入權限 > 但是想使用sftp作為資料傳輸的協定 > 請問有辦法這樣作嗎? Reda this: http://www.debian-administration.org/articles/94 Sometimes you want to have users, that have access to files on your server, but don't want them to be able to log in and execute commands on your server. This is done quite easily. Add user as usually and assign him a password. Then run the following command (replace the 'username' with real user name): root@host # usermod -s /usr/lib/sftp-server username This changes user's shell to sftp-server. The last step for this to work is to add '/usr/lib/sftp-server' to /etc/shells to make it a valid shell, eg. like this: root@host # echo '/usr/lib/stfp-server' >> /etc/shells There. Now you've setup a user who can only access your server with SFTP. -- 東華電機‧後山星城 bbs.ee.ndhu.edu.tw ─ ├ 文章來源﹢ymu041-045.ym.edu.tw --- news://freenews.netfront.net/ - complaints: news@netfront.net ---

11/19 02:40, , 1F
為啥下了這些指令,最後回我沒有/usr/lib/stfp-server檔案
11/19 02:40, 1F

11/19 02:40, , 2F
要先安裝嗎?
11/19 02:40, 2F

11/19 21:51, , 3F
try /usr/lib/ssh/sftp-server
11/19 21:51, 3F

11/22 15:32, , 4F
應該是/usr/lib/sftp-server, 拼錯了
11/22 15:32, 4F
文章代碼(AID): #1Cv9uoFA (Linux)
討論串 (同標題文章)
文章代碼(AID): #1Cv9uoFA (Linux)