wordpress一句话木马,网站的后续优化方案,建设网站需要哪些备案,网站评论怎么做的Ubuntu 配置 ssh 免密连接
本机
#生成密钥
ssh-keygen -t rsa -b 4096
#发送公钥到服务器
ssh-copy-id usernameremote_host
#测试
ssh usernameremote_host全部回车#xff0c;密钥存储路径默认是 ~/.ssh/id_rsa
服务器 确认服务器公钥配置允许远程公钥认证
sudo vim /et…Ubuntu 配置 ssh 免密连接
本机
#生成密钥
ssh-keygen -t rsa -b 4096
#发送公钥到服务器
ssh-copy-id usernameremote_host
#测试
ssh usernameremote_host全部回车密钥存储路径默认是 ~/.ssh/id_rsa
服务器 确认服务器公钥配置允许远程公钥认证
sudo vim /etc/ssh/sshd_config
确认 PubkeyAuthentication yes
sudo systemctl restart ssh本机 为 SSH 连接的服务器设置别名
vim ~/.ssh/configHost nameHostName IP地址Port ssh端口号User root用户名PassWordAuthentication yes 使用密码身份验证sudo systemctl restart sshUbuntu 安装 Docker
一键安装 没有特殊需求直接安装 Docker 的一个 Ubuntu 软件包版本 sudo apt update sudo apt upgrade sudo apt install -y docker.io
service docker start
sudo systemctl enable docker
sudo systemctl is-enabled docker配置Docker镜像源
sudo vim /etc/docker/daemon.json{registry-mirrors: [https://registry.docker-cn.com,https://docker.mirrors.ustc.edu.cn,https://hub-mirror.c.163.com,https://mirror.baidubce.com,https://docker.1panel.live]
}sudo systemctl restart docker
docker info
docker run hello-worldUbuntu 安装 docker-compose GitHub仓库地址 本机下载一个最新对应版本重命名为 docker-compose传到服务器上
scp ./docker-compose rootIP:/usr/bin/服务器赋权限
chomod x /usr/bin/docker-composePS
查看容器日志命令
docker logs 容器ID -fUP