Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Manual page 103

Hide thumbs Also See for LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE:
Table of Contents

Advertisement

Section 9.3:Configuring an OpenSSH Client
9.3.2 Using the scp Command
The scp command can be used to transfer files between machines over a secure, encrypted connection.
It is similar to rcp.
The general syntax to transfer a local file to a remote system is scp localfile username@to-
hostname:/newfilename . The localfile specifies the source, and the group of username@to-
hostname:/newfilename specifies the destination.
To transfer the local file shadowman to your account on penguin.example.net, type the following at
a shell prompt (replace username with your username):
scp shadowman username @penguin.example.net:/home/ username
This will transfer the local file shadowman to /home/ username /shadowman on penguin.ex-
ample.net.
The general syntax to transfer a remote file to the local system is scp username@tohost-
name:/remotefile /newlocalfile. The remotefile specifies the source, and newlocalfile specifies
the destination.
Multiple files can be specified as the source files. For example, to transfer the contents of the directory
/downloads to an existing directory called uploads on the remote machine penguin.example.net,
type the following at a shell prompt:
scp /downloads/* username @penguin.example.net:/uploads/
9.3.3 Using the sftp Command
The sftp utility can be used to open a secure, interactive FTP session. It is similar to ftp except that
it uses a secure, encrypted connection. The general syntax is sftp username@hostname.com .
Once authenticated, you can use a set of commands similar to using FTP. Refer to the sftp manual
page for a list of these commands. To read the manual page, execute the command man sftp at a
shell prompt. The sftp utility is only available in OpenSSH version 2.5.0p1 and higher.
9.3.4 Generating Key Pairs
If you do not want to enter your password every time you ssh, scp, or sftp to a remote machine,
you can generate an authorization key pair.
103

Advertisement

Table of Contents
loading

This manual is also suitable for:

Linux 7.2

Table of Contents