-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #526 from argonne-lcf/saforem2/update-stylesheets-1
Fix list item indentation and change unordered list item styling
- Loading branch information
Showing
2 changed files
with
130 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,65 @@ | ||
# Data Transfer Using `#!bash scp` | ||
|
||
Use `scp` and `SFTP` to transfer data to/from Aurora. | ||
|
||
## Data Transfer | ||
## Transferring files from Aurora (Flare) to Sunspot (Gila) | ||
|
||
Use scp and SFTP to transfer data to/from Aurora. | ||
From an Aurora login-node, you can transfer files to Sunspot's `gila` | ||
file-system using the `#!bash scp` command. | ||
|
||
### Transferring files from Aurora (Flare) to Sunspot (Gila) | ||
From an Aurora login-node, you can transfer files to Sunspot's `gila` filesystem using the `scp` command. But first, you need to create an SSH keypair on Aurora and copy the public key (`*.pub`) to the `~/.ssh/authorized_keys` file on Sunspot. | ||
1. Create SSH keys on the laptop/desktop/remote machine. See "Creating SSH Keys" section on [this page](https://help.cels.anl.gov/docs/linux/ssh/). | ||
2. Copy the public key (*.pub) from ~/.ssh folder on Aurora to ~/.ssh/authorized_keys file on Sunspot (sunspot.alcf.anl.gov) | ||
3. Run the scp command on Aurora to transfer files to Sunspot | ||
2. Copy the contents of the public key file (`*.pub`) located in the `~/.ssh/` folder on Aurora, and append it to the `~/.ssh/authorized_keys` file on Sunspot (`sunspot.alcf.anl.gov`) | ||
3. Run the `scp` command on Aurora to transfer files to Sunspot | ||
``` | ||
username@aurora-uan-0010:~> scp test_file [email protected]://lus/gila/projects/Aurora_deployment/username | ||
... | ||
username@uan-0001:/gila/Aurora_deployment/username> cat test_file | ||
this is a test file | ||
But first, you need to create an SSH keypair on Aurora and copy the public key | ||
(`#!bash *.pub`) to the `#!bash ~/.ssh/authorized_keys` file on Sunspot. | ||
|
||
``` | ||
1. Create SSH keys on the laptop/desktop/remote machine. | ||
See [Creating SSH Keys](https://help.cels.anl.gov/docs/linux/ssh/). | ||
|
||
### Transferring files to Aurora (Flare) | ||
2. Copy the public key (`#!bash \*.pub`) from `#!bash ~/.ssh` folder on Aurora | ||
to `#!bash ~/.ssh/authorized_keys` file on Sunspot | ||
(`#!bash sunspot.alcf.anl.gov`) | ||
|
||
With the bastion pass-through nodes currently used to access both Sunspot and Aurora, users will find it helpful to modify their `.ssh/config` files on Aurora appropriately to facilitate transfers to Aurora from other ALCF systems. These changes are similar to what Sunspot users may have already implemented. From an Aurora login-node, this readily enables one to transfer files from Sunspot's `gila` filesystem or one of the production filesystems at ALCF (`home` and `eagle`) mounted on an ALCF system's login node. With the use of `ProxyJump` below, entering the MobilePass+ or Cryptocard passcode twice will be needed (once for bastion and once for the other resource). A simple example shows the `.ssh/config` entries for Polaris and the `scp` command for transferring from Polaris: | ||
3. Run the `#!bash scp` command on Aurora to transfer files to Sunspot | ||
|
||
``` | ||
$ cat .ssh/config | ||
username@aurora-uan-0009:~> cat .ssh/config | ||
4. Copy the contents of the public key file (`*.pub`) located in the `~/.ssh/` | ||
folder on Aurora, and append it to the `~/.ssh/authorized_keys` file on | ||
Sunspot (`sunspot.alcf.anl.gov`) | ||
|
||
5. Run the `scp` command on Aurora to transfer files to Sunspot | ||
|
||
```bash | ||
src="test_file" | ||
dst="/lus/gila/projects/Aurora_deployment/username" | ||
scp test_file [email protected]:$dst | ||
``` | ||
|
||
``` { .bash .no-copy } | ||
# then, from Sunspot: | ||
$ cat test_file | ||
this is a test file | ||
``` | ||
## Transferring files to Aurora (Flare) | ||
With the bastion pass-through nodes currently used to access both Sunspot and | ||
Aurora, users will find it helpful to modify their `#!bash .ssh/config` files | ||
on Aurora appropriately to facilitate transfers to Aurora from other ALCF | ||
systems. | ||
These changes are similar to what Sunspot users may have already implemented. | ||
From an Aurora login-node, this readily enables one to transfer files from | ||
Sunspot's `gila` filesystem or one of the production filesystems at ALCF | ||
(`home` and `eagle`) mounted on an ALCF system's login node. | ||
With the use of `ProxyJump` below, entering the MobilePass+ or Cryptocard | ||
passcode twice will be needed (once for bastion and once for the other | ||
resource). | ||
A simple example shows the `#!bash .ssh/config` entries for Polaris and the | ||
`#!bash scp` command for transferring from Polaris: | ||
```bash | ||
# on Polaris | ||
$ cat ~/.ssh/config | ||
Host bastion.alcf.anl.gov | ||
User username | ||
|
@@ -35,18 +69,60 @@ Host polaris.alcf.anl.gov | |
user username | ||
``` | ||
```bash | ||
src="/eagle/<project>/<username>/test.txt" | ||
dst="$(pwd)" | ||
scp "${src}" "${dst}" | ||
``` | ||
username@aurora-uan-0009:~> scp [email protected]:/eagle/catalyst/proj-shared/username/test.txt ./ | ||
--------------------------------------------------------------------------- | ||
Notice to Users | ||
... | ||
[Password: | ||
--------------------------------------------------------------------------- | ||
Notice to Users | ||
... | ||
[Password: | ||
username@aurora-uan-0009:~> cat test.txt | ||
from_polaris eagle | ||
``` | ||
## `#!bash scp`: Examples[^examples] | ||
[^examples]: Examples copied from: [scp](https://tldr.inbrowser.app/pages/common/scp) | ||
- Copy a local file to a remote host: | ||
```bash | ||
scp path/to/local_file remote_host:path/to/remote_file | ||
``` | ||
- Use a specific port when connecting to the remote host: | ||
```bash | ||
scp -P port path/to/local_file remote_host:path/to/remote_file | ||
``` | ||
- Copy a file from a remote host to a local directory: | ||
```bash | ||
scp remote_host:path/to/remote_file path/to/local_directory | ||
``` | ||
- Recursively copy the contents of a directory from a remote host to a local directory: | ||
```bash | ||
scp -r remote_host:path/to/remote_directory path/to/local_directory | ||
``` | ||
- Copy a file between two remote hosts transferring through the local host: | ||
```bash | ||
scp -3 host1:path/to/remote_file host2:path/to/remote_directory | ||
``` | ||
- Use a specific username when connecting to the remote host: | ||
```bash | ||
scp path/to/local_file remote_username@remote_host:path/to/remote_directory | ||
``` | ||
- Use a specific SSH private key for authentication with the remote host: | ||
```bash | ||
scp -i ~/.ssh/private_key path/to/local_file remote_host:path/to/remote_file | ||
``` | ||
- Use a specific proxy when connecting to the remote host: | ||
```bash | ||
scp -J proxy_username@proxy_host path/to/local_file remote_host:path/to/remote_file | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters