新服务器的一些操作
SSH禁用密码登录,修改端口
# 复制公钥到服务器 vi ~/.ssh/authorized_keys # 修改sshd配置文件 Port 1234 PermitRootLogin prohibit-password PubkeyAuthentication yes PasswordAuthentication no ChallengeResponseAuthentication no # 重启ssh服务 systemctl restart ssh service ssh restart
同步Git公钥
# 生成SSH密钥对 ssh-keygen -t rsa -b 4096 -C "****@gmail.com" # 将SSH公钥添加到Git服务 cat ~/.ssh/id_rsa.pub
安装Docker