1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-10-30 22:17:57 +01:00
tldr/pages/common/sftp.md
Marco Bonelli 2599a6de48 Refactor: change "folder" to "directory" where needed.
This commit fixes every instance in which the word "folder" is
incorrectly used instead of "directory".
2019-02-13 20:51:04 +05:30

725 B

sftp

Secure File Transfer Program. 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:

sftp {{remote_user}}@{{remote_host}}

  • Connect using an alternate port:

sftp -P {{remote_port}} {{remote_user}}@{{remote_host}}

  • Transfer remote file to the local system:

get {{/path/remote_file}}

  • Transfer local file to the remote system:

put {{/path/local_file}}

  • Transfer remote directory to the local system recursively (works with put too):

get -R {{/path/remote_directory}}

  • Get list of files on local machine:

lls

  • Get list of files on remote machine:

ls