Suppose you have a file that needs to be removed from the server, or you want to put it on the server. It would be a bit redundant to set up some form of FTP client, or configure a share to handle this small task

Fortunately, this is where its scp comes in. SCP allows you to securely transfer files between devices via the command line. It is pre-installed on almost every Linux system

Usage

Remote to local

This will transfer file.md from host.com to /local/directory on your device. Before proceeding with username, you will be prompted to enter your password

scp username@host.com:/remote/file.md /local/directory/

Remote to remote

This will transfer file.md from host A to host B. You will be prompted to enter the passwords of the two hosts to run this command

scp username@hostA.com:/source/file.md username@hostB.com:/destination/file.md

Local to remote

scp /local/file.md username@host.com:/remote/

Limitations

Although scp is a very powerful command, it does have some limitations

  • Not compatible with non-Linux machines: can only be used for scp to transfer files between devices running Linux distributions
点赞(0)

评论列表 共有 0 评论

暂无评论

微信服务号

微信客服

淘宝店铺

support@elephdev.com

发表
评论
Go
顶部