add "Quit sftp." option (#29454)

* add "Quit sftp." option

Added "Quit sftp." and manpage referernce

* fix: changed unix to bash
pull/31443/head^2
prashant 2019-05-11 04:32:47 +05:30 committed by Randell Dawson
parent 07b33d3989
commit 39352ce64d
1 changed files with 14 additions and 8 deletions

View File

@ -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.