SCP examples using OpenSSH

These examples show you how to connect with SCP and issue basic commands.

Use these variables during the connection process:

  • <Username>: When providing the username, the value sshacs must be used. (This is the case for all secure access methods in NetStorage.)
  • <private key>: Apply your private SSH key for this upload account.
  • <Domain Name Prefix>: This value followed by .scp.upload.akamai.com represents your full Upload Domain Name. You set up your domain name during creation of the target storage group.

Connection format

scp [-1234BCpqrv] [-c <cipher>] [-F <ssh_config>] [-i <identity_file>] [-l <limit>] [-o <ssh_option>] [-P <port>] [-S <program>][[user@]host1:] file1[...] [[user@]host2:]file72
Example format
Specify the <local_file> file you want to upload before the user@upload_domain variable. The destination path is appended to the user@upload_domain, separated by a colon. For example:
scp -i <private key> <local_file> sshacs@nsmediadocs.scp.upload.akamai.com:<remote path>
Command description Command and output
Example OpenSSH SCP connection

This example uses the OpenSSH SCP client from a command line. It uses an example domain name prefix of nsmediadocs and the scp.upload.akamai.com upload domain.

scp -i <private key> sshacs@nsmediadocs.scp.upload.akamai.com
Upload a local file to the remote server

This example sends the local movie.mp4 file to the remote /movies directory.

> scp -i <private key> C:\local_folder\movie.mp4 sshacs@nsmediadocs.scp.upload.akamai.com:/movies
movie.mp4						100%   40KB  40.4KB/s   00:00
Recursively upload a local directory to a remote server

This example recursively sends content from the local C:\local_folder\ directory to the remote /movies directory, automatically creating subdirectories as needed.

> scp -i <private key> -r C:\local_folder\ sshacs@nsmediadocs.scp.upload.akamai.com:/movies
.dotfile						100%    0     0.0KB/s   00:00
example.txt						100%   15KB  14.9KB/s   00:00
movie.mp4						100%   40KB  40.4KB/s   00:00
subtitle.srt						100% 5029     4.9KB/s   00:00