Last active
September 13, 2018 02:31
-
-
Save wangxianhe/d9bb9a4006bc0ec456c0ddb62d69a1a8 to your computer and use it in GitHub Desktop.
CentOS7 ssh免密码访问
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
操作比较简单,不详细说了,参考下面命令: | |
HOME=/home/wxh #对应用户账号家目录,此处以/home/wxh为例 | |
ssh-keygen -t dsa -N "" -f "$HOME/.ssh/id_dsa" | |
cp -r $HOME/.ssh/id_dsa.pub $HOME/.ssh/authorized_keys | |
echo "StrictHostKeyChecking no" >> $HOME/.ssh/config | |
chmod 600 $HOME/.ssh/config | |
chmod 600 $HOME/.ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment