# node+react+ssh ![badge](https://cnb.cool/examples/ecosystem/react-ssh-demo/-/badge/git/latest/ci/pipeline-as-code) ![badge](https://cnb.cool/examples/ecosystem/react-ssh-demo/-/badge/git/latest/ci/git-clone-yyds) ![badge](https://cnb.cool/examples/ecosystem/react-ssh-demo/-/badge/git/latest/ci/status/push) 在当前的这个示例中,您将通过云原生构建实现,打包"react-ssh-demo"项目,构建并将构建产物上传到服务器中 # 前提条件 1. 使用 [云原生构建(CNB)](https://cnb.cool) 构建你的项目 2. 环境变量及其用法,[环境变量](https://docs.cnb.cool/zh/env.html) 3. 声明式的[构建缓存](https://docs.cnb.cool/zh/grammar/pipeline.html#volumes) 4. 插件及其用法,[插件市场](https://docs.cnb.cool/zh/plugins.html) 5. 使用[SCP插件](https://docs.cnb.cool/zh/plugins/public/open-source/scp/scp) :通过ssh复制文件或者代码 6. 使用[SSH插件](https://docs.cnb.cool/zh/plugins/public/open-source/ssh/ssh):通过ssh在远端host执行命令 # 配置密钥 react-ssh-secret.yml ```yaml # ssh cfg REMOTE_HOST: xxx REMOTE_USERNAME: xxx REMOTE_PASSWORD: xxx REMOTE_PORT: xxx PRIVATE_KEY: | -----BEGIN RSA PRIVATE KEY----- xxxxxxxx -----END RSA PRIVATE KEY----- ```