Difference between revisions of "SFTP"
Wesley-vuong (talk | contribs) |
Wesley-vuong (talk | contribs) |
||
Line 47: | Line 47: | ||
== Downloading == | == Downloading == | ||
=== The GET command === | === The GET command === | ||
The get command lets you download one or more files from a remote server to a local computer | The get command lets you download one or more files from a remote server to a local computer. | ||
It has | It has the following syntax: | ||
{{ConsoleLine||get <file> [ [ <file2> ... ] <directory>\[ <newname> ] ]}} | {{ConsoleLine||get <file> [ [ <file2> ... ] <directory>\[ <newname> ] ]}} |
Revision as of 17:30, 26 February 2023
Introduction[edit]
SSH is a secure way of accessing servers. We will be using SSH to upload and download a file from Coder Merlin.
Prerequisites[edit]
An SSH client[edit]
Linux and Mac operating systems have a built-in terminal that is a secure shell client. Windows users can either use puTTY or the "secure shell extension" on Google Chrome. This extension works on all Chromium-based browsers like Opera. You will need an SSH client to download and upload files. We will be using the Google Chrome Extension in this demonstration.
Starting the Secure Shell Chrome extension in SFTP mode[edit]
Click the Secure Shell Chrome Extension's icon and choose connection dialog The connection string is in the firstname-lastname@host format To Connect to the Code Merlin server, I will type
queen-guinevere@ssh.codermerlin.com
Click SFTP to connect
Uploading[edit]
The PUT command[edit]
We will be using the PUT command to upload files (and directories) from a local computer to a remote server. The PUT command has this syntax
put <file> [ [ <file2> ... ] <directory>/[ <newname> ] ]
All parameters except the
<file>
parameter are optional
You can specify the upload directory using the
<directory>
parameter. If no upload directory is specified, the file will be uploaded to the working directory
The MPUT command[edit]
The MPUT command lets you upload multiple files simultaneously and has this syntax
mput filename1 filename2 filename3 ...
rysnc
Uploading[edit]
Create file.txt on your computer Type put Browse for this file Confirm that the file has been uploaded with the ls command that lists all directories and files in the working directory
Type
ls
Downloading[edit]
The GET command[edit]
The get command lets you download one or more files from a remote server to a local computer. It has the following syntax:
get <file> [ [ <file2> ... ] <directory>\[ <newname> ] ]
Downloading[edit]
Type
get file.txt
to download the file you've just uploaded