Skip to content

Commit

Permalink
Merge pull request #526 from argonne-lcf/saforem2/update-stylesheets-1
Browse files Browse the repository at this point in the history
Fix list item indentation and change unordered list item styling
  • Loading branch information
felker authored Nov 7, 2024
2 parents de511b5 + 2aa9c16 commit c18975f
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 56 deletions.
140 changes: 108 additions & 32 deletions docs/aurora/data-management/moving_data_to_aurora/scp.md
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
Expand All @@ -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
```
46 changes: 22 additions & 24 deletions docs/stylesheets/alcf-extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,20 @@ body {
}

.md-typeset h1 {
/* font-size: 60px; */
/* line-height: 60px; */
border-bottom: 1px solid rgb(216, 220, 225);
padding-bottom: .75rem;
margin: 0;
border-bottom: 1px solid rgb(216, 220, 225);
padding-bottom: .75rem;
margin: 0;
}

.md-typeset h2 {
/* font-size: 36px; */
/* line-height: 36px; */
}

.md-typeset h3 {
/* margin:3em 0 0; */
;
}
/* .md-typeset h2 { */
/* /* font-size: 36px; */ */
/* /* line-height: 36px; */ */
/* } */
/**/
/* .md-typeset h3 { */
/* /* margin:3em 0 0; */ */
/* ; */
/* } */

.md-typeset p, .md-typeset li {
font-size: 19px;
Expand All @@ -49,24 +47,24 @@ body {
margin-block-start: .8em;
}

.md-typeset li{
margin-block-start: 0;
}
/* .md-typeset li{ */
/* margin-block-start: 0; */
/* } */


.md-typeset ul {
list-style-type: none;
list-style-type: disc;
}

.md-typeset ul > li {
text-indent: -15px;
}
/* .md-typeset ul > li { */
/* text-indent: -15px; */
/* } */

.md-typeset ul > li:before {
content: "–";
margin-right: 5px;
/* content: " "; */
/* margin-right: 1rem; */
font-weight: 600;
color: #6e6e78;
color: var(--md-accent-fg-color);
}

.md-typeset :target {
Expand Down

0 comments on commit c18975f

Please sign in to comment.