Changes

Jump to: navigation, search

Tutorial6: File Transfer / Sending Email Messages

No change in size, 08:44, 24 January 2021
INVESTIGATION 2: USING SECURE FTP
# You should be in the '''sftp command prompt''' where you are expected to issue '''sftp commands'''.<br>Please take a moment to common ''sftp commands'' on the right-side table.<br><br>
# Issue the following ''sftp command'': <span style="color:blue;font-weight:bold;font-family:courier;">pwd</span><br><br>What is the pathname? Which server does this represent: local or remote?<br><br>
# Issue the following ''sftp command'': <span style="color:blue;font-weight:bold;font-family:courier;">!pwdlpwd</span><br><br>What is the pathname? Which server does this represent: local or remote?<br><br>
# Issue the following ''sftp command'' to create a directory on your remote server: <span style="color:blue;font-weight:bold;font-family:courier;">mkdir remote2</span><br><br>
# Issue the following ''sftp command'' to confirm that the '''remote2''' directory has been created in your remote server's home directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">ls</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 '''local2''' so we can learn to <u>download</u> a file from your remote directory.<br><br>
# Issue the following ''sftp command'' (without an argument) to change to the parent directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">lcd ..</span><br><br>
# Issue the '''!pwdlpwd''' ''sftp command'' to confirm that your current working directory on your local server is your home directory.<br><Br># Issue the following ''sftp command'' to create the following directory on your local server:<br><span style="color:blue;font-weight:bold;font-family:courier;">!mkdir lmkdir local2</span><br><br>
# Issue the following ''sftp 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 '''!pwdlpwd''' ''sftp command'' to confirm you have changed to the ''local2'' directory on your local server.<br><br>Let's learn to <u>download</u> a file from your remote server to your local server.<br><br>
# Issue the following '''sftp command''' to transfer your '''thefile.txt''' file from the '''remote2''' directory on your remote server to your local computer:<br><span style="color:blue;font-weight:bold;font-family:courier;">get thefile.txt</span><br><br>
# Issue the '''!lslls''' '''sftp command''' to confirm 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 start an sftp session (note: yoursenecaid is YOUR Seneca ID):<br><span style="color:blue;font-weight:bold;font-family:courier;">sftp yoursenecaid@matrix.senecacollege.ca</span><br><br>'''NOTE:''' You may be required to enter '''yes''' to have the public key shared.<br><br>You are now in the '''sftp command prompt''' where you are expected to issue '''sftp commands'''.<br>Please refer to the table of ''sftp commands'' in the '''KEY CONCEPTS''' section for reference.<br><br>
# Issue the following ''sftp command'': <span style="color:blue;font-weight:bold;font-family:courier;">pwd</span><br><br>What is the pathname? Which server does this represent: local or remote?<br><br>
# Issue the following ''sftp command'': <span style="color:blue;font-weight:bold;font-family:courier;">!pwdlpwd</span><br><br>What is the pathname? Which server does this represent: local or remote?<br><br>
# Issue the following ''sftp command'' to create a directory on your remote server: <span style="color:blue;font-weight:bold;font-family:courier;">mkdir remote</span><br><br>
# Issue the following ''sftp command'' to confirm that the '''remote''' directory has been created in your remote server's home directory:<br><span style="color:blue;font-weight:bold;font-family:courier;">ls</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 '''local2''' so we can learn to <u>download</u> a file from your remote directory.<br><br>
# Issue the following ''sftp 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 '''!pwdlpwd''' ''sftp command'' to confirm that your current working directory on your local server is your home directory.<br><Br># Issue the following ''sftp command'' to create the following directory on your local server:<br><span style="color:blue;font-weight:bold;font-family:courier;">!mkdir lmkdir local2</span><br><br>
# Issue the following ''sftp 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 '''!pwdlpwd''' ''sftp command'' to confirm you have changed to the ''local2'' directory on your local server.<br><br>Let's learn to <u>download</u> a file from your remote server to your local server.<br><br>
# Issue the following '''sftp 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 '''!lslls''' '''sftp command''' to confirm 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>
13,420
edits

Navigation menu