13,420
edits
Changes
→INVESTIGATION 2: USING SECURE FILE TRANSMISSION CONTROL PROTOCOL
# Issue the '''pwd''' sftp command to confirm that you have changed to the ''local'' directory on your local server.<br><br>
# Issue the following Linux command to transfer your ~/local/thefile.txt file to the ~/remote directory on your remote server:<br><span style="color:blue;font-weight:bold;font-family:courier;">put thefile.txt</span><br><br>
# Issue the '''ls''' sftp command to confirmed that you transferred/copied the file: thefile.txt<br><br>Let's create another directory on your local server called storage so we can learn to download a file from your remote directory.<br><br># Issue the following Linux command (without an argument) to change to your home directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">lcd</span><br><br># Issue the '''!pwd''' command to confirm that your current working directory on your local server is your home directory.<br><Br># Issue the following Linux command to create the following directory on your local server:<br><span style="color:blue;font-weight:bold;font-family:courier;">mkdir local2</span><br><br># Issue the following Linux command to change to the '''local2''' directory on your local server:<br><span style="color:blue;font-weight:bold;font-family:courier;">lcd local2</span><br><br># Issue the !pwd command to confirm you have changed to the ''local2'' directory on your local server.<br><br>Let's learn to download a file from your remote server to your local server.<br><br># Issue the following Linux command to transfer your thefile.txt file from your remote directory on your local server:<br><span style="color:blue;font-weight:bold;font-family:courier;">get thefile.txt</span><br><br># Issue the '''!ls''' sftp command to confirmed that you transferred/copied the file: thefile.txt on your local server.<br><br>
# Issue the following sftp command to exit the sftp utlilty: <span style="color:blue;font-weight:bold;font-family:courier;">exit</span><br><br>
# Issue the following Linux command to confirm that you are back in your original server: <span style="color:blue;font-weight:bold;font-family:courier;">hostname</span><br><br>Let's run a shell script to see if you correctly transferred/copied files between your local and remote servers.<br><br>