Changes

Jump to: navigation, search

OPS235 Lab 7 - CentOS7

272 bytes added, 07:19, 5 May 2015
no edit summary
# Remain in your '''centos2''' VM for this section.
# To connect to a remote host type the command:<br /><b><code><span style="color:#3366CC;font-size:1.2em;">sftp ops235@centos3</span></code></b>
# This will establish an interactive session after authentication.
# Type <b><code><span style="color:#3366CC;font-size:1.2em;">help</span></code></b> to see the list of sftp commands at any time.# The 2 main commands are <b><code><span style="color:#3366CC;font-size:1.2em;">put</span></code></b> to copy a file from the local host to the remote host (upload) and <b><code><span style="color:#3366CC;font-size:1.2em;">get</span></code></b> to copy a file from the remote host to the local host (download).# Try using <code>'''sftp</code> ''' to transfer files back and forth between hosts.{|width="40%" align="right"
{|width="40%" align="right"
|- valign="top"
|{{Admon/tip| SELinux | SELinux may prevent ssh from accessing your home directories on centos1 because you created a new filesystem there. You can reset the security context of the /home directory with this command: <code>'''restorecon -Rv /home</code>'''}}
|}
<ol>
<li value="7">As you did previously you can also use the <code>'''scp</code> ''' command to copy files to and from remote hosts and even from one remote host to another.</li><li>Use <code>'''scp</code> ''' to copy your services file to the centos3 host into the /tmp directory. (The path on a remote host follows the ''':''') using the command: <br /><b><code><span style="color:#3366CC;font-size:1.2em;">scp /etc/services ops235@centos3:/tmp</span></code></b></li><li>Experiment with <code>'''scp</code> ''' to copy a file from '''centos3 ''' directly to '''centos1'''.</li>
</ol>
13,420
edits

Navigation menu