We can transfer files to the OSG Connect login host using the Unix
scp command. Note
scp is a counterpart
to the secure shell command,
ssh, that allows for secure, encrypted file transfers between systems using your
To transfer a file using
scp, you'll need to run
scp with the source and
destination. Files on remote systems are indicated using
First, log in using your OSG Connect user id (username):
$ ssh email@example.com
Once logged in, change to the data directory, a link from your home area:
$ cd ~/data
This directory is area on the Stash data server that you can use to store files and directories. It functions just like any other UNIX directory although it has additional functions that we'll go over shortly.
Let's create a file:
$ echo "Hello world" > my_hello_world
Now copy the file just created from Stash to our local system (Desktop or laptop):
$ scp firstname.lastname@example.org:~/data/my_hello_world .
As you can see,
scp uses similar syntax to the
cp command. To copy
scp, you'll just pass the (recursive)
-r option to it.
$ scp -r email@example.com:~/data/my-directory .
This page was updated on Dec 15, 2019 at 01:45 from start/data/scp.md.