Skip to content

Instantly share code, notes, and snippets.

@leigler
Created March 7, 2019 15:38
Show Gist options
  • Save leigler/7c1db6174687d87a2e2c2b9cf0095363 to your computer and use it in GitHub Desktop.
Save leigler/7c1db6174687d87a2e2c2b9cf0095363 to your computer and use it in GitHub Desktop.

SFTP cli notes

Establishing a connection

sftp root@your_server_ip

Commands

  • help or ?
  • exit bye
  • remote: ls, cd, mkdir, ln, rm, rmdir
  • local: lls, lcd, lmkdir

Getting files

  • get remoteFile
  • We can copy the remote file to a different name by specifying the name afterwards: get remoteFile localFile
  • get -r someDirectory

Uploading files

  • put localFile
  • put -r localDirectory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment