User Tools

Site Tools

tools:sftp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools:sftp [2025/09/23 23:51] – [Uploading Files] Humphrey Boa-Garttools:sftp [2025/09/30 22:44] (current) – external edit 127.0.0.1
Line 6: Line 6:
 ===== Using SFTP ===== ===== Using SFTP =====
  
-SFTP is a widely-supported protocol, so you can use it in a variety of applications. Here are the most important ones:+SFTP is a widely-supported protocol, so you can use it in a variety of applications. For Linux, BSD & MacOS users, your local [[tools:bash|shell]] is by far the quickest way to transfer files using SFTP:
  
  
-==== Command Line ==== +==== Connecting ====
- +
-For Linux, BSD & MacOS users, your local [[tools:bash|shell]] is by far the quickest way to transfer files using SFTP: +
- +
- +
-=== Connecting ===+
  
 Connecting to an SFTP server works exactly the same as connecting to an [[tools:ssh#linux-bsd-macos|SSH]] server - you just use the ''sftp'' instead of the ''ssh'' command, and when prompted give your password: Connecting to an SFTP server works exactly the same as connecting to an [[tools:ssh#linux-bsd-macos|SSH]] server - you just use the ''sftp'' instead of the ''ssh'' command, and when prompted give your password:
Line 27: Line 22:
  
  
-=== Navigation ===+==== Navigation ====
  
 Traversing an SFTP system works much the same way as it does in [[tools:bash|bash]] - in fact it uses simplified versions of many of the same commands, albeit in a reduced form. Traversing an SFTP system works much the same way as it does in [[tools:bash|bash]] - in fact it uses simplified versions of many of the same commands, albeit in a reduced form.
  
-== Finding Your Location ==+=== Finding Your Location ===
  
 Use ''pwd'' to show your current location //(the 'present working directory')// on the remote server: Use ''pwd'' to show your current location //(the 'present working directory')// on the remote server:
Line 37: Line 32:
   sftp> pwd   sftp> pwd
  
-== Showing Directory Contents ==+=== Showing Directory Contents ===
  
 Use the ''ls'' command to show the contents of the pwd. Use ''ls -la'' to show a more detailed listing with metadata: Use the ''ls'' command to show the contents of the pwd. Use ''ls -la'' to show a more detailed listing with metadata:
Line 44: Line 39:
   sftp> ls -la   sftp> ls -la
  
-== Moving Around ==+=== Moving Around ===
  
 Use the ''cd'' command to change the pwd: Use the ''cd'' command to change the pwd:
Line 50: Line 45:
   sftp> cd path/to/directory/   sftp> cd path/to/directory/
  
-=== Downloading Files ===+==== File Transfer ====
  
-== Check Download Path ==+=== Check Local Path ===
  
-Before downloading anything, check the download path //(or the 'local pwd')// with the ''lpwd'' command, so you know where your downloads are going:+Before downloading anything, check the download path //(or the 'local pwd')// with the ''lpwd'' command, so you know where your files are going:
  
   sftp> lpwd   sftp> lpwd
Line 62: Line 57:
   sftp> lcd new/path/   sftp> lcd new/path/
   sftp> lls -la   sftp> lls -la
 +
 +
 +=== Downloading Files ===
 +
 +Once you know where your downloads are going, you can grab files with the ''get'' command:
 +
 +  sftp> get filename
 +
 +To download whole directories, use the ''-r'' flag:
 +
 +  sftp> get -r name/of/directory/
  
  
Line 69: Line 75:
  
  
-=== Advanced Wizardry ===+==== Advanced Wizardry ====
  
 {{wst>expand}} {{wst>expand}}
  
-=== SFTP in PowerShell ===+===== SFTP in PowerShell =====
  
 For unfortunate Windows users with [[tools:powershell|PowerShell]], you do not have SFTP support built-in. You will have to set up [[https://www.nakivo.com/blog/how-to-build-powershell-tools-to-setup-sftp/|Posh-SSH]] to use SFTP from your shell with your local filesystem. For unfortunate Windows users with [[tools:powershell|PowerShell]], you do not have SFTP support built-in. You will have to set up [[https://www.nakivo.com/blog/how-to-build-powershell-tools-to-setup-sftp/|Posh-SSH]] to use SFTP from your shell with your local filesystem.
  
  
-==== Graphical Applications ====+===== Graphical Applications =====
  
 If command line is too daunting for you, you can always install programs like [[https://filezilla-project.org/|Filezilla]] or [[https://winscp.net/|WinSCP]] to visually browse the SFTP server. Many other programs support SFTP connections as well. If command line is too daunting for you, you can always install programs like [[https://filezilla-project.org/|Filezilla]] or [[https://winscp.net/|WinSCP]] to visually browse the SFTP server. Many other programs support SFTP connections as well.
tools/sftp.1758671472.txt.gz · Last modified: (external edit)

Find this page online at: https://bestpoint.institute/tools/sftp