請教各位先進
小的現在架了一套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
-----------------------------------------
有錯請鞭
--
All Comments