2013-12-08 19:56:16 +11:00
|
|
|
# scp
|
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
> Copies files between hosts on a network
|
|
|
|
> Works over a secure connection (SSH)
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
- upload a file or directory
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
`scp {{/local/file}} {{10.0.0.1}}:{{/remote/path/}}`
|
|
|
|
`scp {{/local/file}} {{10.0.0.1}}:{{/remote/path/newname}}`
|
|
|
|
`scp -r {{/local/folder}} {{10.0.0.1}}:{{/remote/path/}}`
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
- download a file (reversed)
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
`scp {{10.0.0.1}}:{{/remote/path/filename}} {{/local/file}}`
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
- specify credentials
|
2013-12-08 19:56:16 +11:00
|
|
|
|
2013-12-09 22:12:16 +11:00
|
|
|
`scp {{/local/file}} {{my_user}}@{{10.0.0.1}}:{{/remote/path/}}`
|