Web搭建入门教程:基于ssh向服务器推送文件

Web

ssh登陆命令(需要在bash环境中运行)

bash 复制代码
# 远程作为root登陆服务器
ssh -i ecs-key.pem root@x.x.x.x
bash 复制代码
cd /home/hana # 移动到工作目录下
ls # 查看目录下的文件
bash 复制代码
# 远程传输文件
scp -i ecs-key-xianggang.pem my-website.zip root@47.243.175.94:/home/hana

假设你上传了一个test.md

bash 复制代码
mv test.md my-website/content/ # 移动文件位置

pm2服务更新命令

bash 复制代码
pm2 list
pm2 stop my-website
pm2 start .output/server/index.mjs --name my-website

在网站上查看你的网页,点此查看演示

相关推荐
柳鲲鹏6 小时前
交叉编译:strip: Unable to recognise the format of the input file xx.c.o
linux·运维·服务器
漂亮_大男孩6 小时前
Git|GitHub SSH 连接配置与验证全流程(通用方法)
git·ssh·github
Le1Yu6 小时前
微服务拆分以及注册中心
linux·运维·服务器
zzzsde6 小时前
【Linux】linux基础指令入门(1)
linux·运维·学习
moxiaoran57537 小时前
nginx中proxy_pass配置
运维·服务器·nginx
weixin_379880927 小时前
.Net Core WebApi集成Swagger
java·服务器·.netcore
leellun7 小时前
在Centos上安装Python指定版本
linux·运维·centos
她说彩礼65万7 小时前
Asp.net core Kestrel服务器详解
服务器·后端·asp.net
ZLRRLZ8 小时前
【Linux操作系统】进程控制
linux·运维·服务器