mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 20:55:34 +02:00
Merge pull request #755 from slash3b/slash3b
sftp: add navigation and transfer examples
This commit is contained in:
commit
f8fa104340
1 changed files with 16 additions and 7 deletions
|
@ -1,7 +1,8 @@
|
||||||
# sftp
|
# sftp
|
||||||
|
|
||||||
> Secure file transfer program.
|
> Secure File Transfer Program.
|
||||||
> Copy files between hosts using Secure File Transfer Protocol over SSH.
|
> Interactive program to copy files between hosts over SSH.
|
||||||
|
> For non-interactive file transfers, see `scp` or `rsync`.
|
||||||
|
|
||||||
- Connect to a remote server and enter an interactive command mode:
|
- Connect to a remote server and enter an interactive command mode:
|
||||||
|
|
||||||
|
@ -9,12 +10,20 @@
|
||||||
|
|
||||||
- Connect using an alternate port:
|
- Connect using an alternate port:
|
||||||
|
|
||||||
`sftp -P {{remote_port}} {{remote_host}}`
|
`sftp -P {{remote_port}} {{remote_user}}@{{remote_host}}`
|
||||||
|
|
||||||
- Copy a local file to a remote host:
|
- Transfer remote file to the local system:
|
||||||
|
|
||||||
`sftp {{local_file}} {{remote_host}}:{{/path/remote_file}}`
|
`get {{/path/remote_file}}`
|
||||||
|
|
||||||
- Copy a remote file to the local host:
|
- Transfer local file to the remote system:
|
||||||
|
|
||||||
`sftp {{remote_host}}:{{/path/remote_file}} {{local_file}}`
|
`put {{/path/local_file}}`
|
||||||
|
|
||||||
|
- Get list of files on local machine:
|
||||||
|
|
||||||
|
`lls`
|
||||||
|
|
||||||
|
- Get list of files on remote machine:
|
||||||
|
|
||||||
|
`ls`
|
||||||
|
|
Loading…
Add table
Reference in a new issue