add "Quit sftp." option (#29454)
* add "Quit sftp." option Added "Quit sftp." and manpage referernce * fix: changed unix to bashpull/31443/head^2
parent
07b33d3989
commit
39352ce64d
|
@ -7,39 +7,45 @@ This article is a quick tutorial on how to use Secure File Transfer Protocol (SF
|
||||||
### Testing SSH
|
### Testing SSH
|
||||||
If you haven't already, test that you are able to SSH into the server. SFTP uses the Secure Shell (SSH) protocol, so if you are unable to SSH you probably won't be able to SFTP either.
|
If you haven't already, test that you are able to SSH into the server. SFTP uses the Secure Shell (SSH) protocol, so if you are unable to SSH you probably won't be able to SFTP either.
|
||||||
|
|
||||||
```unix
|
```bash
|
||||||
ssh your_username@hostname_or_ip_address
|
ssh your_username@hostname_or_ip_address
|
||||||
```
|
```
|
||||||
### Start SFTP Session
|
### Start SFTP Session
|
||||||
This uses the same syntax as SSH and opens a session in which you can transfer files.
|
This uses the same syntax as SSH and opens a session in which you can transfer files.
|
||||||
```unix
|
```bash
|
||||||
sftp your_username@hostname_or_ip_address
|
sftp your_username@hostname_or_ip_address
|
||||||
```
|
```
|
||||||
To list helpful commands:
|
To list helpful commands:
|
||||||
```unix
|
```bash
|
||||||
help
|
help
|
||||||
```
|
```
|
||||||
### Transfer files and folders
|
### Transfer files and folders
|
||||||
|
|
||||||
To download a file:
|
To download a file:
|
||||||
```unix
|
```bash
|
||||||
get <filename>
|
get <filename>
|
||||||
```
|
```
|
||||||
To download a folder and its contents, use the "-r" flag (also works for uploading):
|
To download a folder and its contents, use the "-r" flag (also works for uploading):
|
||||||
```unix
|
```bash
|
||||||
get -r <foldername>
|
get -r <foldername>
|
||||||
```
|
```
|
||||||
To upload a file:
|
To upload a file:
|
||||||
```unix
|
```bash
|
||||||
put <filename>
|
put <filename>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Change folders
|
### Change folders
|
||||||
To change the local folder:
|
To change the local folder:
|
||||||
```unix
|
```bash
|
||||||
lcd <path/to/folder>
|
lcd <path/to/folder>
|
||||||
```
|
```
|
||||||
To change the remote folder:
|
To change the remote folder:
|
||||||
```unix
|
```bash
|
||||||
cd <path/to/folder>
|
cd <path/to/folder>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Quit sftp.
|
||||||
|
Once done with file transfer you can exit SFTP prompt using `bye` command
|
||||||
|
`sftp> bye`
|
||||||
|
|
||||||
|
For more info on SFTP use 'man sftp' in linux terminal.
|
||||||
|
|
Loading…
Reference in New Issue