博客
关于我
sftp常用命令介绍
阅读量:209 次
发布时间:2019-02-28

本文共 532 字,大约阅读时间需要 1 分钟。

sftp服务器搭建完成后,我们可以通过命令操作它。在这里,我们将逐步学习sftp的使用方法。

1. 连接到sftp服务器

要使用sftp命令首先需要建立连接。在Linux shell中输入以下命令即可:

sftp user@ip

系统会提示你输入密码,输入password即可完成连接。

2. 查看可用命令

连接成功后,输入help可查看sftp支持的所有命令,了解哪些操作可以在sftp环境中执行。

3. 操作远端目录

  • pwd:显示当前远端服务器的目录。
  • lpwd:显示当前本地目录。

4. 查看文件列表

  • ls:查看远端服务器当前目录下的文件。
  • lls:查看本地当前目录下的文件。

5. 文件传输

  • put a.txt:将本地文件a.txt上传到远端服务器的当前目录。
  • get b.txt:将远端文件b.txt下载到本地当前目录。

6. 执行本地命令

  • !command:在本地执行命令。例如:
    • !ls:查看本地当前目录下的文件。
    • !rm a.txt:删除本地a.txt文件。

7. 退出sftp会话

  • exitquit:退出sftp会话。

通过以上命令,你可以轻松地在sftp环境中完成文件传输和目录操作。记得在使用sftp时,确保你的用户名和密码已正确配置。

转载地址:http://vgqs.baihongyu.com/

你可能感兴趣的文章
npm install 报错 no such file or directory 的解决方法
查看>>
npm install 权限问题
查看>>
npm install报错,证书验证失败unable to get local issuer certificate
查看>>
npm install无法生成node_modules的解决方法
查看>>
npm install的--save和--save-dev使用说明
查看>>
npm node pm2相关问题
查看>>
npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
查看>>
npm run build报Cannot find module错误的解决方法
查看>>
npm run build部署到云服务器中的Nginx(图文配置)
查看>>
npm run dev 报错PS ‘vite‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。
查看>>
npm scripts 使用指南
查看>>
npm should be run outside of the node repl, in your normal shell
查看>>
npm start运行了什么
查看>>
npm WARN deprecated core-js@2.6.12 core-js@<3.3 is no longer maintained and not recommended for usa
查看>>
npm 下载依赖慢的解决方案(亲测有效)
查看>>
npm 安装依赖过程中报错:Error: Can‘t find Python executable “python“, you can set the PYTHON env variable
查看>>
npm.taobao.org 淘宝 npm 镜像证书过期?这样解决!
查看>>
npm—小记
查看>>
npm介绍以及常用命令
查看>>
NPM使用前设置和升级
查看>>