xiaomaohai

上传文件到服务器的Linux命令


1 ssh

在Cygwin中执行:$ ssh username@remotehost




2 scp

命令scp基于SSH协议,可以将本地文件拷贝到远程服务上的指定目录,格式如下:

 

$ scp filename username@remotehost:remotedirectory

 

执行:$ scp ipmsg.log admin@10.25.1.202:/home/admin



3 ftp/sftp

首先用root用户登录远程Linux服务器,将admin用户添加到FTP账户中。

 

通过echo命令追加一行到user_list文件中:# echo admin >> user_list

 

之后通过service命令开启FTP服务:# service vsftpd start



 

现在就可以在本机访问FTP远程服务器了,然后通过put命令上传文件了。

 

在Cygwin中执行:$ sftp admin@10.25.1.202




4 SSH Windows Client

SSH提供了一个scp2.exe作为Windows下的scp命令工具。

 

具体位置:C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell


 

参考资料

 

scp命令

http://www.cnblogs.com/hitwtx/archive/2011/11/16/2251254.html

 

Windows SSH Client - SCP2 Syntax

http://unix.business.utah.edu/doc/applications/sshsf_windows_client/scp2_syntax.html

 


分类:

技术点:

相关文章:

  • 2022-01-01
  • 2021-12-09
  • 2021-09-22
  • 2022-12-23
  • 2021-04-16
  • 2021-09-26
猜你喜欢
  • 2022-12-23
  • 2022-01-09
  • 2021-12-18
  • 2021-05-09
  • 2022-12-23
  • 2021-12-22
  • 2021-12-14
相关资源
相似解决方案