首先生成 SSH 密钥对,如果已有密钥对可跳过这步
ssh-keygen -t ed25519 -C "your_email@example.com"使用 ssh-copy-id 将密钥复制到服务器上
ssh-copy-id -i ~/.ssh/id_ed25519 username@server或手动复制公钥内容添加到服务器的 ~/.ssh/authorized_keys 文件中
scp <source_file> username@server:<target_path>readlink /linkll /linkmkdir dirnametouch filenamelsof -i :{port}# 显示当前目录总占的大小,而不单独各列出子项占用的大小
du -hs [file]echo "NodeJS version: `node -v`"ssh username@server 'command'
# 在服务器上创建文件夹
ssh root@example.com 'mkdir ~/new_dir'