云服务器自动化部署
准备登录
获取本机公钥
本机PowerShell执行
1 | echo "echo '$(cat $env:userprofile\.ssh\*.pub)' >> ~/.ssh/authorized_keys" |
腾讯云后台 一键登录(WebShell)
1 | sudo su root |
本机验证
1 | client/run-tencent.bat |
登录
终端登录
1 | ssh root@101.43.208.171 |
生成 SSH 密钥
1 | ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' -q -C tom |
添加 SSH 公钥
在 Gitte 后台添加 SSH公钥 https://gitee.com/profile/sshkeys
备份
压缩
1 | tar -zcvf ssh.tar.gz --exclude authorized_keys --exclude known_hosts .ssh/ |
下载保存
本机PowerShell执行
1 | sftp root@101.43.208.171 |
准备登录
本机验证
1 | client/run-huawei.bat |
登录
终端登录
1 | ssh root@119.3.141.3 |
生成 SSH 密钥
1 | ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' -q -C tom |
添加 SSH 公钥
在 Gitte 后台添加 SSH公钥 https://gitee.com/profile/sshkeys
备份
压缩
1 | tar -zcvf ssh.tar.gz --exclude authorized_keys --exclude known_hosts .ssh/ |
下载保存
本机PowerShell执行
1 | sftp root@119.3.141.3 |
测试 Gitte 连接
1 | ssh -o StrictHostKeyChecking=no -T git@gitee.com |
自动化执行
1 | git clone --depth 1 git@gitee.com:landream/auto-install.git ~/auto-install && cd ~/auto-install/server |