如何自動執行ssh-keygen,產生authorized_keys - Linux
By Elizabeth
at 2010-07-22T22:49
at 2010-07-22T22:49
Table of Contents
請教各位先進
小的現在架了一套cluster,1台Head Node, 11台Compute Node
請問如何讓所有新使用者第一次登入時
自動執行 ssh-keygen 並產生 authorized_keys
謝謝
----
謝謝 maxwux & chiouss 的指教
我在 /etc/skel/.bash_profile
新增:
-----------------------------------------
if [ ! -f ~/.ssh/authorized_keys ]; then
mkdir ~/.ssh
ssh-keygen -N "" -f ~/.ssh/id_rsa
cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
fi
-----------------------------------------
有錯請鞭
--
Tags:
Linux
All Comments
By Ursula
at 2010-07-25T18:53
at 2010-07-25T18:53
By Donna
at 2010-07-28T14:29
at 2010-07-28T14:29
Related Posts
shell-scripts的問題(把檔案輸入後修改並輸出)
By Aaliyah
at 2010-07-22T17:47
at 2010-07-22T17:47
StarDict 單字地圖
By Hamiltion
at 2010-07-22T16:05
at 2010-07-22T16:05
gDesklets
By Audriana
at 2010-07-22T12:18
at 2010-07-22T12:18
Linux 驅動程式初探 - 資料結構
By Eartha
at 2010-07-22T11:15
at 2010-07-22T11:15
cygwin 鍵盤無法輸入問題
By Yuri
at 2010-07-22T02:56
at 2010-07-22T02:56