<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.c3g-app.sd4h.ca/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dbrownlee</id>
	<title>SD4H wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.c3g-app.sd4h.ca/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dbrownlee"/>
	<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/wiki/Special:Contributions/Dbrownlee"/>
	<updated>2026-04-24T10:16:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=221</id>
		<title>Rclone</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=221"/>
		<updated>2026-03-06T19:15:33Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://rclone.org/ Rclone] is a powerful client that can interact with multiple storage backends, it offers a good support for our Ceph version of the S3 api and has good speed transfer out of the box.  It can also be used to mount an Object Store as traditional block file storage.  &lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
First [https://rclone.org/downloads/ download rclone] or use the [https://rclone.org/install/#script-installation script installation].  Then [[Store_and_Share_data#Configuring_S3_access|get your S3 &amp;lt;code&amp;gt;id key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;]] from Open Stack.&lt;br /&gt;
&lt;br /&gt;
Create the following file:  &lt;br /&gt;
&lt;br /&gt;
  ~/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
access_key_id = &amp;lt;S3 ID from previous step&amp;gt;&lt;br /&gt;
secret_access_key = &amp;lt;S3 secret from previous step&amp;gt;&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
acl = private&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then list current bucket, create a bucket and then copy a file into it,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
$rclone mkdir   c3g-prod:test&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
          -1 2025-04-15 18:08:32        -1 test&lt;br /&gt;
$rclone copy my-file.txt my-project:test&lt;br /&gt;
$rclone ls  my-project:test/&lt;br /&gt;
    12408 my-file.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mounting an Object Store ==&lt;br /&gt;
To allow mounting by non-root users, in /etc/fuse.conf, uncomment:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user_allow_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Mount the Object Store in daemon mode with:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/dir --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
#rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Unmount with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;fusermount -u /path/to/local/mount&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A service may be used to auto-mount the Object Store on boot with a service file (in /etc/systemd/system/).&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Mount the ihec_data_objstr, even after a restart&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=My Object Store automount&lt;br /&gt;
After=network.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/point/dir --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
# ExecStart=/usr/bin/rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
ExecStop=/usr/bin/fusermount -u /mnt/ihec_data_objstr&lt;br /&gt;
Restart=always&lt;br /&gt;
SyslogIdentifier=ihec_data_objstr&lt;br /&gt;
User=ihec&lt;br /&gt;
Group=ihec&lt;br /&gt;
Environment=RCLONE_CONFIG=/home/ihec/.config/rclone/rclone.conf&lt;br /&gt;
TimeoutStopSec=30&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;enable and start the service.&lt;br /&gt;
&lt;br /&gt;
== Mounting a public Object Store without using credentials ==&lt;br /&gt;
Public Object Stores may be accessed or mounted as read-only without the use of Open Stack credentials.  This relies on a bucket syntax prepended with the Open Stack project ID.&lt;br /&gt;
&lt;br /&gt;
Your ~/.config/rclone/rclone.conf need not contain an access_key_id and secret_access_key but only:&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-public-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Then combine the OS project ID and the bucket name like so:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone lsd my-public-project:&amp;lt;OS project ID&amp;gt;:&amp;lt;bucket name&amp;gt;&lt;br /&gt;
# For example:&lt;br /&gt;
# rclone lsd my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data&lt;br /&gt;
# or&lt;br /&gt;
# rclone mount my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== No problems, only solutions ==&lt;br /&gt;
&lt;br /&gt;
=== I cannot upload a file larger than 48GB. === &lt;br /&gt;
In some situations, rclone is not able to guess the size of the file to upload and use the default value of &amp;lt;code&amp;gt;--s3-chunk-size 5M&amp;lt;/code&amp;gt; to split and upload the file to the bucket. But since the server has a 10,000 chunk limit, the upload crashes.&lt;br /&gt;
&lt;br /&gt;
You can solve that by setting a larger  value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone copy --s3-chunk-size 50M my-large-file.cram my-project:test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another way is to lower the maximum number of parts in a multipart upload using [https://rclone.org/s3/#s3-max-upload-parts --s3-max-upload-parts], for example: &amp;lt;code&amp;gt;--s3-max-upload-parts 1000&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that you need the ram of your computer to be larger than chunks.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Globus&amp;diff=212</id>
		<title>Globus</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Globus&amp;diff=212"/>
		<updated>2025-12-15T17:38:58Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Browser compatibility issues.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requesting access  ==&lt;br /&gt;
We offer the possibility of managing you Object Storage space with Globus. This is not a default offering and the configuration needs to be activated by one of our platform administrator. You can request access at juno@calculquebec.ca.&lt;br /&gt;
&lt;br /&gt;
== Globus Web App Browser Compatibility Issues ==&lt;br /&gt;
Despite Globus&#039;s claims to be compatible with most evergreen browsers, compatibility issues have been personally experienced with Firefox (146.0, 5-Dec-2025).  Uploading and downloading through the Web App did not function.  Chrome was used successfully as a work-around.&lt;br /&gt;
&lt;br /&gt;
== Get S3 API key ==&lt;br /&gt;
&lt;br /&gt;
The data access is a two level step. SD4H needs to give you access, you also need to generate you own key to complete the procedure. The procedure to generate [[Store_and_Share_data#Create_the_S3_(ec2)_Credentials|S3 credentials is documented on another page]]. The important point here is that the &#039;&#039;access&#039;&#039; and &#039;&#039;secret&#039;&#039; keys will are named &#039;&#039;AWS IAM Access Key ID&#039;&#039; and &#039;&#039;AWS IAM Secret Key&#039;&#039; respectively in the Globus interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing My Data ==&lt;br /&gt;
Once you have the confirmation that a Globus Collection has been configured on the SD4H side, you can connected to [https://app.globus.org the Globus app ] with your &#039;&#039;Digital Research Alliance of Canada&#039;&#039; account and look for the name of your OpenStack project in FILE MANAGER --&amp;gt; Collection search inbox. Here the project this example de project is named c3g-dev.  &lt;br /&gt;
 &lt;br /&gt;
[[File:Screenshot from 2025-02-10 15-54-48.png|caption|none|1200px|Search for you project&#039;s collection]]&lt;br /&gt;
&lt;br /&gt;
The collection will always be named &amp;lt;project name&amp;gt;_collection and be subscribed under SD4H Globus Automated Endpoint, look the the three pictograms to the left of the  list, you will see the pad lock and the pantheon-like pictogram and the key, meaning respectively that the collection is in institutional High Availability mode and private.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After accessing the collection you will see the following request: &#039;&#039;&#039;Your credential requires some initial setup&#039;&#039;&#039;. Click continue and enter there the &#039;&#039;AWS IAM Access Key ID&#039;&#039; and &#039;&#039;AWS IAM Secret Key&#039;&#039; you got from the the previous step.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Globus&amp;diff=211</id>
		<title>Globus</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Globus&amp;diff=211"/>
		<updated>2025-12-15T17:34:29Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Minor syntax.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Requesting access  ==&lt;br /&gt;
We offer the possibility of managing you Object Storage space with Globus. This is not a default offering and the configuration needs to be activated by one of our platform administrator. You can request access at juno@calculquebec.ca.&lt;br /&gt;
&lt;br /&gt;
== Get S3 API key ==&lt;br /&gt;
&lt;br /&gt;
The data access is a two level step. SD4H needs to give you access, you also need to generate you own key to complete the procedure. The procedure to generate [[Store_and_Share_data#Create_the_S3_(ec2)_Credentials|S3 credentials is documented on another page]]. The important point here is that the &#039;&#039;access&#039;&#039; and &#039;&#039;secret&#039;&#039; keys will are named &#039;&#039;AWS IAM Access Key ID&#039;&#039; and &#039;&#039;AWS IAM Secret Key&#039;&#039; respectively in the Globus interface.&lt;br /&gt;
&lt;br /&gt;
== Accessing My Data ==&lt;br /&gt;
Once you have the confirmation that a Globus Collection has been configured on the SD4H side, you can connected to [https://app.globus.org the Globus app ] with your &#039;&#039;Digital Research Alliance of Canada&#039;&#039; account and look for the name of your OpenStack project in FILE MANAGER --&amp;gt; Collection search inbox. Here the project this example de project is named c3g-dev.  &lt;br /&gt;
 &lt;br /&gt;
[[File:Screenshot from 2025-02-10 15-54-48.png|caption|none|1200px|Search for you project&#039;s collection]]&lt;br /&gt;
&lt;br /&gt;
The collection will always be named &amp;lt;project name&amp;gt;_collection and be subscribed under SD4H Globus Automated Endpoint, look the the three pictograms to the left of the  list, you will see the pad lock and the pantheon-like pictogram and the key, meaning respectively that the collection is in institutional High Availability mode and private.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After accessing the collection you will see the following request: &#039;&#039;&#039;Your credential requires some initial setup&#039;&#039;&#039;. Click continue and enter there the &#039;&#039;AWS IAM Access Key ID&#039;&#039; and &#039;&#039;AWS IAM Secret Key&#039;&#039; you got from the the previous step.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=188</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=188"/>
		<updated>2025-08-13T14:15:45Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Connecting to a server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, The Bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 HOSTNAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Typical Commands ===&lt;br /&gt;
The Bastion has a lot of commands available.  Autocomplete is very helpful and removes the need to remember a whole new set of CLI commands.  For a typical user, the [potentially] most relevant are: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Show a help message, including available commands.&lt;br /&gt;
help&lt;br /&gt;
# Basic info about your account.&lt;br /&gt;
info&lt;br /&gt;
# List accessible servers.&lt;br /&gt;
selfListAccess&lt;br /&gt;
# Generate scp passthrough script.&lt;br /&gt;
scp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
It is possible to scp files in both directions through The Bastion using a special script that The Bastion will generate for you.  Follow the [https://ovh.github.io/the-bastion/plugins/open/scp.html scp setup directions] found in The Bastion documentation.&lt;br /&gt;
&lt;br /&gt;
Check the scp-via-bastion script The Bastion generates - it may need some minor tweaking.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Check&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion-candig &amp;quot;&lt;br /&gt;
# Change to FQDN or IP address, if needed.&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@198.168.188.147 &amp;quot; # Or @&amp;lt;DOMAIN NAME&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The scp-via-bastion script may also be renamed (or aliased) and moved from $HOME to a directory within the user&#039;s $PATH (such as ~/.local/bin/).&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
The Bastion provides both Group and Personal access methodologies.  Which method you use depends on The Bastion configurations.  Your connections will work the same no matter which method is used, so from a user perspective, the distinction is moot.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=187</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=187"/>
		<updated>2025-08-11T15:52:54Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Typical Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, The Bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Typical Commands ===&lt;br /&gt;
The Bastion has a lot of commands available.  Autocomplete is very helpful and removes the need to remember a whole new set of CLI commands.  For a typical user, the [potentially] most relevant are: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Show a help message, including available commands.&lt;br /&gt;
help&lt;br /&gt;
# Basic info about your account.&lt;br /&gt;
info&lt;br /&gt;
# List accessible servers.&lt;br /&gt;
selfListAccess&lt;br /&gt;
# Generate scp passthrough script.&lt;br /&gt;
scp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
It is possible to scp files in both directions through The Bastion using a special script that The Bastion will generate for you.  Follow the [https://ovh.github.io/the-bastion/plugins/open/scp.html scp setup directions] found in The Bastion documentation.&lt;br /&gt;
&lt;br /&gt;
Check the scp-via-bastion script The Bastion generates - it may need some minor tweaking.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Check&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion-candig &amp;quot;&lt;br /&gt;
# Change to FQDN or IP address, if needed.&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@198.168.188.147 &amp;quot; # Or @&amp;lt;DOMAIN NAME&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The scp-via-bastion script may also be renamed (or aliased) and moved from $HOME to a directory within the user&#039;s $PATH (such as ~/.local/bin/).&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
The Bastion provides both Group and Personal access methodologies.  Which method you use depends on The Bastion configurations.  Your connections will work the same no matter which method is used, so from a user perspective, the distinction is moot.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=186</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=186"/>
		<updated>2025-08-11T14:55:30Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Connecting to a server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, The Bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Typical Commands ===&lt;br /&gt;
The Bastion has a lot of commands available.  Autocomplete is very helpful and removes the need to remember a whole new set of CLI commands.  For a typical user, the [potentially] most relevant are: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Show a help message, including available commands.&lt;br /&gt;
help&lt;br /&gt;
# Basic info&lt;br /&gt;
info&lt;br /&gt;
# List accessible servers.&lt;br /&gt;
selfListAccess&lt;br /&gt;
# Generate scp passthrough script&lt;br /&gt;
scp&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
It is possible to scp files in both directions through The Bastion using a special script that The Bastion will generate for you.  Follow the [https://ovh.github.io/the-bastion/plugins/open/scp.html scp setup directions] found in The Bastion documentation.&lt;br /&gt;
&lt;br /&gt;
Check the scp-via-bastion script The Bastion generates - it may need some minor tweaking.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Check&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion-candig &amp;quot;&lt;br /&gt;
# Change to FQDN or IP address, if needed.&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion.candig.sd4h.ca &amp;quot; # Or @&amp;lt;IP ADDRESS&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The scp-via-bastion script may also be renamed (or aliased) and moved from $HOME to a directory within the user&#039;s $PATH (such as ~/.local/bin/).&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
The Bastion provides both Group and Personal access methodologies.  Which method you use depends on The Bastion configurations.  Your connections will work the same no matter which method is used, so from a user perspective, the distinction is moot.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=185</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=185"/>
		<updated>2025-08-11T14:34:37Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Using scp, sftp, rsync through The Bastion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, The Bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
It is possible to scp files in both directions through The Bastion using a special script that The Bastion will generate for you.  Follow the [https://ovh.github.io/the-bastion/plugins/open/scp.html scp setup directions] found in The Bastion documentation.&lt;br /&gt;
&lt;br /&gt;
Check the scp-via-bastion script The Bastion generates - it may need some minor tweaking.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Check&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion-candig &amp;quot;&lt;br /&gt;
# Change to FQDN or IP address, if needed.&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion.candig.sd4h.ca &amp;quot; # Or @&amp;lt;IP ADDRESS&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The scp-via-bastion script may also be renamed (or aliased) and moved from $HOME to a directory within the user&#039;s $PATH (such as ~/.local/bin/).&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
The Bastion provides both Group and Personal access methodologies.  Which method you use depends on The Bastion configurations.  Your connections will work the same no matter which method is used, so from a user perspective, the distinction is moot.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=184</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=184"/>
		<updated>2025-08-07T21:29:40Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Using scp, sftp, rsync through The Bastion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, The Bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
It is possible to scp files in both directions through The Bastion using a special script that The Bastion will generate for you.  Follow the [https://ovh.github.io/the-bastion/plugins/open/scp.html scp setup directions] found in The Bastion documentation.&lt;br /&gt;
&lt;br /&gt;
Check the scp-via-bastion script The Bastion generates - it may need some minor tweaking.&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Check&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion-candig &amp;quot;&lt;br /&gt;
# Change to FQDN or IP address, if needed.&lt;br /&gt;
BASTION_CMD=&amp;quot;ssh davidbr@bastion.candig.sd4h.ca &amp;quot; # Or @&amp;lt;IP ADDRESS&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The scp-via-bastion script may also be renamed (or aliased) and moved from $HOME to a directory within the user&#039;s $PATH such as ~/.local/bin/.&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
The Bastion provides both Group and Personal access methodologies.  Which method you use depends on The Bastion configurations.  Your connections will work the same no matter which method is used, so from a user perspective, the distinction is moot.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=183</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=183"/>
		<updated>2025-08-07T19:36:26Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Connection types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, The Bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
It is possible to scp files in both directions through The Bastion using a special script that The Bastion will generate for you.  Follow the [https://ovh.github.io/the-bastion/plugins/open/scp.html scp setup directions] found in The Bastion documentation.&lt;br /&gt;
&lt;br /&gt;
The scp-via-bastion script The Bastion generates needs some minor tweaking.&lt;br /&gt;
 From:&lt;br /&gt;
 BASTION_CMD=&amp;quot;ssh davidbr@bastion-candig  &amp;quot;&lt;br /&gt;
 To:&lt;br /&gt;
 BASTION_CMD=&amp;quot;ssh davidbr@bastion.candig.sd4h.ca  &amp;quot; # Or @&amp;lt;IP ADDRESS&amp;gt;&lt;br /&gt;
The scp-via-bastion script may also be renamed (or aliased) and moved to a directory present in the user&#039;s $PATH rather than $HOME.&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
The Bastion provides both Group and Personal access methodologies.  Which method you use depends on The Bastion configurations.  Your connections will work the same no matter which method is used, so from a user perspective, the distinction is moot.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=182</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=182"/>
		<updated>2025-08-07T18:48:10Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Bastion in a nutshell */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.  Like an http reverse proxy for ssh, it is used to connect to other servers.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, the bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
More to follow.&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=181</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=181"/>
		<updated>2025-08-06T21:46:59Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Using scp, sftp, rsync */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, the bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync through The Bastion ===&lt;br /&gt;
More to follow.&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=180</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=180"/>
		<updated>2025-08-06T21:46:39Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, the bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using scp, sftp, rsync ===&lt;br /&gt;
More to follow.&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=179</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=179"/>
		<updated>2025-08-06T21:44:57Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to an external, registered server.&lt;br /&gt;
In a direct connection, the bastion acts as a transparent pass-through.  This is the most convenient, likely and common way you will connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=178</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=178"/>
		<updated>2025-08-06T21:43:33Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Connection types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to a registered server.&lt;br /&gt;
In a direct connection, the bastion acts as a pass-through.  This is the most convenient, likely and common way you will use connect.  See the &amp;quot;Connecting to a server&amp;quot; section below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=177</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=177"/>
		<updated>2025-08-06T21:38:50Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to (or through) Bastion!&lt;br /&gt;
&lt;br /&gt;
=== Connection types ===&lt;br /&gt;
There are three types of connections you can make.&lt;br /&gt;
&lt;br /&gt;
# Interactive mode&lt;br /&gt;
# Non-interactive mode&lt;br /&gt;
# Directly to a registered server (the bastion acts as a pass-through). &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=176</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=176"/>
		<updated>2025-08-06T21:34:39Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name and a proposed alias.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to Bastion!&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=175</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=175"/>
		<updated>2025-08-06T21:26:19Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to Bastion!&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the Bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a destination domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=174</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=174"/>
		<updated>2025-08-06T21:21:32Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to Bastion!&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;OpenStack provides name resolution for VMs on the same network.  If the bastion server is on the same OpenStack network as the destination servers, you may use the VM name rather than its IP address.  This makes using bssh essentially identical to using ssh (though rather than a domain name, the VM name is used). &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=173</id>
		<title>SSH to a server via Bastion</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=SSH_to_a_server_via_Bastion&amp;diff=173"/>
		<updated>2025-08-06T21:13:49Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Bastion in a nutshell ==&lt;br /&gt;
[https://ovh.github.io/the-bastion/index.html The Bastion] is a single point of entry for SSH connections.&lt;br /&gt;
&lt;br /&gt;
Some servers in SD4H may not be publicly accessible from the public internet for security reasons.&lt;br /&gt;
&lt;br /&gt;
Bastion is used as an SSH proxy to connect users to servers.&lt;br /&gt;
&lt;br /&gt;
== User guide ==&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
To use Bastion, an administrator must create an account for you.&lt;br /&gt;
&lt;br /&gt;
Please include the public SSH key you will use to connect to Bastion in your request for an account.&lt;br /&gt;
&lt;br /&gt;
After creating your account, the administrator will get back to you with your Bastion user name.&lt;br /&gt;
&lt;br /&gt;
=== Creating the Bastion alias ===&lt;br /&gt;
For your convenience, it is recommended to create an alias for the Bastion connection:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
alias bssh=&#039;ssh -t &amp;lt;YOUR BASTION USERNAME&amp;gt;@bastion.sd4h.ca --&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After adding the alias, you can connect to Bastion!&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Interactive mode (signs out when idle)&lt;br /&gt;
bssh    # SSH into Bastion&lt;br /&gt;
help    # runs the Bastion &#039;help&#039; command&lt;br /&gt;
&lt;br /&gt;
# Non-interactive mode equivalent with &#039;--osh&#039;&lt;br /&gt;
bssh --osh help&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Permissions ===&lt;br /&gt;
Bastion uses the principle of least privileges, meaning that users must be granted explicit access to servers.&lt;br /&gt;
&lt;br /&gt;
As such, a fresh Bastion user will not have access to anything at first, accesses must be granted by an administrator.&lt;br /&gt;
&lt;br /&gt;
=== Listing your server accesses ===&lt;br /&gt;
The &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command lists the servers you have access to in Bastion.&lt;br /&gt;
&lt;br /&gt;
To view your accesses, simply run the command:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
bssh --osh selfListAccesses&lt;br /&gt;
&lt;br /&gt;
# Dear &amp;lt;USERNAME&amp;gt;, you have access to the following servers:&lt;br /&gt;
#             IP PORT             USER              ACCESS-BY   ADDED-BY   ADDED-AT&lt;br /&gt;
# -------------- ----   -------------- ---------------------- ---------- ----------&lt;br /&gt;
#  &amp;lt;SERVER 1 IP&amp;gt;   22  &amp;lt;SERVER 1 USER&amp;gt;  &amp;lt;GROUP&amp;gt;(group-member) vrocheleau 2024-09-11&lt;br /&gt;
#  &amp;lt;SERVER 2 IP&amp;gt;   22  &amp;lt;SERVER 2 USER&amp;gt;               personal vrocheleau 2024-09-11&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Connecting to a server ===&lt;br /&gt;
You can connect directly to any server that is listed by the &amp;lt;code&amp;gt;selfListAccesses&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
Taking the example output from the previous section:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# connect to &amp;quot;SERVER 1&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# connect to &amp;quot;SERVER 2&amp;quot;&lt;br /&gt;
bssh &amp;lt;SERVER 2 USER&amp;gt;@&amp;lt;SERVER 2 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;You may avoid using IP addresses by creating a host name in your ~/.ssh/config such as:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
Host &amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
    HostName &amp;lt;SERVER 1 IP&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This allows you to connect through bastion directly to any server with:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Connect to a server, using the ~/.ssh/config host name.&lt;br /&gt;
# This makes using bssh essentially identical to using ssh. &lt;br /&gt;
bssh &amp;lt;SERVER 1 USER&amp;gt;@&amp;lt;SERVER 1 NAME&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access types ===&lt;br /&gt;
Coming soon!&lt;br /&gt;
&lt;br /&gt;
==== Group ====&lt;br /&gt;
&lt;br /&gt;
==== Personal ====&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=170</id>
		<title>Backing up Object Store</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=170"/>
		<updated>2025-06-03T21:37:23Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Restore procedure clean-up.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Object Store data, while stored redundantly via Ceph, is not backed up by default.  Object Store buckets are backed up to the TSM tape system upon request only by following the procedures listed on this page.&lt;br /&gt;
&lt;br /&gt;
== Content and policies ==&lt;br /&gt;
The following are the default contents and policies of requested backups:&lt;br /&gt;
&lt;br /&gt;
What is in the backup?&lt;br /&gt;
 * Only the bucket data is backed up.  We are not currently backing up the IAM policies of the buckets or objects.&lt;br /&gt;
 * Only the current version of the data is seen by the backup system.  Object chunks or versioned objects are not seen by the backups system.&lt;br /&gt;
What is the backup policy?&lt;br /&gt;
 * Backups are run on a daily basis.&lt;br /&gt;
 * The current object and one modified version of object are kept (this is different than full bucket versioning).    &lt;br /&gt;
 * The modified version is kept for 6 month - after that period only the current object is kept. &lt;br /&gt;
 * Deleted objects are kept for 6 months.&lt;br /&gt;
&lt;br /&gt;
= Backup Procedure =&lt;br /&gt;
&lt;br /&gt;
Please follow this procedure to request backups of your buckets. &lt;br /&gt;
&lt;br /&gt;
==Email the list of buckets==&lt;br /&gt;
&lt;br /&gt;
Send a list of buckets to be backed up to [mailto:juno@calculquebec.ca sd4h support] with the name and ID of the project where the buckets live.&lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
An IAM policy statement must be applied to &#039;&#039;&#039;all the buckets&#039;&#039;&#039; you want to backup so the TSM robot user in charge of the backup can access them.  This can be done with the [https://awscli.amazonaws.com/v2/documentation/api/latest/index.html aws cli].&lt;br /&gt;
&lt;br /&gt;
First, ensure that &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; currently has no IAM policy.  Check bucket &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using profile &amp;lt;code&amp;gt;my-profile&amp;lt;/code&amp;gt; (as defined in ~/.aws/config and ~/.aws/credentials files) with: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket&lt;br /&gt;
&lt;br /&gt;
An error occurred (NoSuchBucketPolicy) when calling the GetBucketPolicy operation: The bucket policy does not exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that command returns something, the new policy statements must be added to the existing policy (which is not covered here).&lt;br /&gt;
&lt;br /&gt;
The following policy.json needs to be applied.&lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Load the policy onto the bucket &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using the profile &amp;lt;code&amp;gt;my-profile:&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$aws s3api put-bucket-policy --policy file://my-policy.json --profile my-profile --bucket my-bucket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Confirm IAM policy applied ==&lt;br /&gt;
As we did before, request the bucket&#039;s IAM policy, ensuring that the contents of policy.json are listed.&lt;br /&gt;
 $aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
&lt;br /&gt;
==List bucket==&lt;br /&gt;
&lt;br /&gt;
Send us list of buckets or object to restore to [mailto:juno@calculquebec.ca sd4h support]. &lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
For each bucket you want to be restored, you will be asked to create a bucket with the &amp;lt;code&amp;gt;-restore&amp;lt;/code&amp;gt; suffix. &lt;br /&gt;
&lt;br /&gt;
Following the previous procedure, apply this restore IAM policy. &lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObjectAcl&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:AbortMultipartUpload&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket-restore/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket-restore&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once done, we will restore your data to the &amp;lt;code&amp;gt;*-restore&amp;lt;/code&amp;gt; buckets.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=169</id>
		<title>Backing up Object Store</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=169"/>
		<updated>2025-06-03T20:30:43Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: /* Confirm policy applied */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Object Store data, while stored redundantly via Ceph, is not backed up.  Object Store buckets are backed up to the TSM tape system upon request only by following the procedures listed on this page.&lt;br /&gt;
&lt;br /&gt;
The following contents and policies apply to backups by default:&lt;br /&gt;
&lt;br /&gt;
What is in the backup?&lt;br /&gt;
 * Only the bucket data is backed up.  We are not currently backing up the IAM policies of the buckets or objects.&lt;br /&gt;
 * Only the current version of the data is seen by the backup system.  Object chunks or versioned objects are not seen by the backups system.&lt;br /&gt;
What is the backup policy?&lt;br /&gt;
 * Backups are run on a daily basis.&lt;br /&gt;
 * The current object and one modified version of object are kept (this is different than full bucket versioning).    &lt;br /&gt;
 * The modified version is kept for 6 month - after that period only the current object is kept. &lt;br /&gt;
 * Deleted objects are kept for 6 months.&lt;br /&gt;
&lt;br /&gt;
= Backup Procedure =&lt;br /&gt;
&lt;br /&gt;
Please follow this procedure to request backups of your buckets. &lt;br /&gt;
&lt;br /&gt;
==Email the list of buckets==&lt;br /&gt;
&lt;br /&gt;
Send a list of buckets to backup to [mailto:juno@calculquebec.ca sd4h support] with the name and ID of the project where the buckets live.&lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
An iam policy statement must be applied to &#039;&#039;&#039;all the buckets&#039;&#039;&#039; you want to backup so the TSM robot user in charge of the backup can access them.  This can be done with the [https://awscli.amazonaws.com/v2/documentation/api/latest/index.html aws cli].&lt;br /&gt;
&lt;br /&gt;
First, ensure that &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; currently has no policy.  Check bucket &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using profile &amp;lt;code&amp;gt;my-profile&amp;lt;/code&amp;gt; (as defined in ~/.aws/config and ~/.aws/credentials files): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket&lt;br /&gt;
&lt;br /&gt;
An error occurred (NoSuchBucketPolicy) when calling the GetBucketPolicy operation: The bucket policy does not exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that command returns something, the new policy statements must be added to the existing policy (which is not covered here).&lt;br /&gt;
&lt;br /&gt;
The following policy.json needs to be applied.&lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Load the policy onto the bucket &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using the profile &amp;lt;code&amp;gt;my-profile&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$aws s3api put-bucket-policy --policy file://my-policy.json --profile my-profile --bucket my-bucket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Confirm IAM policy applied ==&lt;br /&gt;
As we did before, request the bucket&#039;s IAM policy, ensuring that the contents of policy.json are listed.&lt;br /&gt;
 $aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
&lt;br /&gt;
==List bucket==&lt;br /&gt;
&lt;br /&gt;
Send us list of buckets or object to restore to [mailto:juno@calculquebec.ca sd4h support]. &lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
You will be asked to create a bucket for each bucket you want to restore to restore with the &amp;lt;code&amp;gt;-restore&amp;lt;/code&amp;gt; suffix. &lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObjectAcl&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:AbortMultipartUpload&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket-restore/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bycket-restore&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is done we will restore you data to that folder.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=168</id>
		<title>Backing up Object Store</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=168"/>
		<updated>2025-06-03T20:28:52Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Confirm policy applied section added.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Object Store data, while stored redundantly via Ceph, is not backed up.  Object Store buckets are backed up to the TSM tape system upon request only by following the procedures listed on this page.&lt;br /&gt;
&lt;br /&gt;
The following contents and policies apply to backups by default:&lt;br /&gt;
&lt;br /&gt;
What is in the backup?&lt;br /&gt;
 * Only the bucket data is backed up.  We are not currently backing up the IAM policies of the buckets or objects.&lt;br /&gt;
 * Only the current version of the data is seen by the backup system.  Object chunks or versioned objects are not seen by the backups system.&lt;br /&gt;
What is the backup policy?&lt;br /&gt;
 * Backups are run on a daily basis.&lt;br /&gt;
 * The current object and one modified version of object are kept (this is different than full bucket versioning).    &lt;br /&gt;
 * The modified version is kept for 6 month - after that period only the current object is kept. &lt;br /&gt;
 * Deleted objects are kept for 6 months.&lt;br /&gt;
&lt;br /&gt;
= Backup Procedure =&lt;br /&gt;
&lt;br /&gt;
Please follow this procedure to request backups of your buckets. &lt;br /&gt;
&lt;br /&gt;
==Email the list of buckets==&lt;br /&gt;
&lt;br /&gt;
Send a list of buckets to backup to [mailto:juno@calculquebec.ca sd4h support] with the name and ID of the project where the buckets live.&lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
An iam policy statement must be applied to &#039;&#039;&#039;all the buckets&#039;&#039;&#039; you want to backup so the TSM robot user in charge of the backup can access them.  This can be done with the [https://awscli.amazonaws.com/v2/documentation/api/latest/index.html aws cli].&lt;br /&gt;
&lt;br /&gt;
First, ensure that &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; currently has no policy.  Check bucket &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using profile &amp;lt;code&amp;gt;my-profile&amp;lt;/code&amp;gt; (as defined in ~/.aws/config and ~/.aws/credentials files): &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket&lt;br /&gt;
&lt;br /&gt;
An error occurred (NoSuchBucketPolicy) when calling the GetBucketPolicy operation: The bucket policy does not exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that command returns something, the new policy statements must be added to the existing policy (which is not covered here).&lt;br /&gt;
&lt;br /&gt;
The following policy.json needs to be applied.&lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Load the policy onto the bucket &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using the profile &amp;lt;code&amp;gt;my-profile&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$aws s3api put-bucket-policy --policy file://my-policy.json --profile my-profile --bucket my-bucket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Confirm policy applied ==&lt;br /&gt;
As we did before, request the bucket&#039;s IAM policy, ensuring that the contents of policy.json are listed.&lt;br /&gt;
 $aws s3api get-bucket-policy --profile c3g-data-repos --bucket my-bucket&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
&lt;br /&gt;
==List bucket==&lt;br /&gt;
&lt;br /&gt;
Send us list of buckets or object to restore to [mailto:juno@calculquebec.ca sd4h support]. &lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
You will be asked to create a bucket for each bucket you want to restore to restore with the &amp;lt;code&amp;gt;-restore&amp;lt;/code&amp;gt; suffix. &lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObjectAcl&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:AbortMultipartUpload&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket-restore/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bycket-restore&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is done we will restore you data to that folder.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=167</id>
		<title>Backing up Object Store</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Backing_up_Object_Store&amp;diff=167"/>
		<updated>2025-06-03T19:36:40Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Slight re-wording of first para.  Minor spelling corrections.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
Object Store data, while stored redundantly via Ceph, is not backed up.  Object Store buckets are backed up to the TSM tape system upon request only by following the procedures listed on this page.&lt;br /&gt;
&lt;br /&gt;
The following contents and policies apply to backups by default:&lt;br /&gt;
&lt;br /&gt;
What is in the backup?&lt;br /&gt;
 * Only the bucket data is backed up.  We are not currently backing up the IAM policies of the buckets or objects.&lt;br /&gt;
 * Only the current version of the data is seen by the backup system.  Object chunks or versioned objects are not seen by the backups system.&lt;br /&gt;
What is the backup policy?&lt;br /&gt;
 * Backups are run on a daily basis.&lt;br /&gt;
 * The current object and one modified version of object are kept (this is different than full bucket versioning).    &lt;br /&gt;
 * The modified version is kept for 6 month - after that period only the current object is kept. &lt;br /&gt;
 * Deleted objects are kept for 6 months.&lt;br /&gt;
&lt;br /&gt;
= Backup Procedure =&lt;br /&gt;
&lt;br /&gt;
Please follow this procedure to request backups of your buckets. &lt;br /&gt;
&lt;br /&gt;
==List bucket==&lt;br /&gt;
&lt;br /&gt;
Send a list of buckets to back up to [mailto:juno@calculquebec.ca sd4h support] with the name and ID of the project where the buckets live.&lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
You need to configure the iam policy statement of &#039;&#039;&#039;all the buckets&#039;&#039;&#039; you want to back up so your TSM robot user in charge of the backup can access them. Here is the policy that needs to be added.&lt;br /&gt;
&lt;br /&gt;
For example, using the [https://docs.aws.amazon.com/cli/latest/ aws cli], apply the policy on &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; using the &amp;lt;code&amp;gt;my-profile&amp;lt;/code&amp;gt; identity. &lt;br /&gt;
&lt;br /&gt;
First, we make sure that &amp;lt;code&amp;gt;my-bucket&amp;lt;/code&amp;gt; currently has no policy. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$aws s3api --profile my-project  get-bucket-policy --bucket  my-bucket&lt;br /&gt;
&lt;br /&gt;
An error occurred (NoSuchBucketPolicy) when calling the GetBucketPolicy operation: The bucket policy does not exist&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that command returns something, you need to add the new statement the existing policy. But we are not covering that here.&lt;br /&gt;
&lt;br /&gt;
Adding policy.json to my-bucket&lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=json file=my-policy.json&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bycket&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then loading the policy to the bucket:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$aws s3api --profile my-profile  put-bucket-policy --policy file://my-policy.json --bucket my-bucket&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Restore Procedure=&lt;br /&gt;
&lt;br /&gt;
==List bucket==&lt;br /&gt;
&lt;br /&gt;
Send us list of buckets or object to restore to [mailto:juno@calculquebec.ca sd4h support]. &lt;br /&gt;
&lt;br /&gt;
==Give us permission==&lt;br /&gt;
&lt;br /&gt;
You will be asked to create a bucket for each bucket you want to restore to restore with the &amp;lt;code&amp;gt;-restore&amp;lt;/code&amp;gt; suffix. &lt;br /&gt;
&amp;lt;div class=&amp;quot;filename&amp;quot;&amp;gt;&#039;&#039;&#039;File :&#039;&#039;&#039; policy.json &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot; file=&amp;quot;my-policy.json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;quot;Statement&amp;quot;: [&lt;br /&gt;
  {&lt;br /&gt;
    &amp;quot;Effect&amp;quot;: &amp;quot;Allow&amp;quot;,&lt;br /&gt;
    &amp;quot;Principal&amp;quot;: {&amp;quot;AWS&amp;quot;: [&amp;quot;arn:aws:iam:::user/tsm&amp;quot;]},&lt;br /&gt;
    &amp;quot;Action&amp;quot;: [&lt;br /&gt;
      &amp;quot;s3:ListBucket&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:GetObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObject&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:PutObjectAcl&amp;quot;,&lt;br /&gt;
      &amp;quot;s3:AbortMultipartUpload&amp;quot;&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;Resource&amp;quot;: [&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bucket-restore/*&amp;quot;,&lt;br /&gt;
      &amp;quot;arn:aws:s3:::my-bycket-restore&amp;quot;&lt;br /&gt;
    ]&lt;br /&gt;
  }&lt;br /&gt;
]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once it is done we will restore you data to that folder.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Store_and_Share_data&amp;diff=166</id>
		<title>Store and Share data</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Store_and_Share_data&amp;diff=166"/>
		<updated>2025-05-20T17:38:49Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Fonts.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Intro=&lt;br /&gt;
SD4H has a large Object Store. Objects are accessible through a web API via the Rados Gateway (radosgw) service. Both the S3 and swift API standards are supported by the radosgw.&lt;br /&gt;
&lt;br /&gt;
In an Object Store, an object is the equivalent of a file on a posix file system. The object store gives users a lot of flexibility, but the steps to do simple tasks like sharing and transferring data involve somewhat of a learning cure. We propose a procedure here so this curve is as gentle as possible. Once done, the procedure will be both more secure and more flexible than sharing data on a share HPC platform or on some VM owned by your group.   &lt;br /&gt;
&lt;br /&gt;
= Configuring S3 access =&lt;br /&gt;
&lt;br /&gt;
# You first need to have your [[OpenStack Client]] installed and configured. &lt;br /&gt;
# Then, with the client you generate an e2c/S3 id and secret&lt;br /&gt;
&lt;br /&gt;
With the client is installed and the RC files downloaded in step 1 you can create the S3 ID and secret. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
$ source  $HOME/id/myproject-openrc.sh&lt;br /&gt;
Please enter your OpenStack Password for project po-test as user poq: &lt;br /&gt;
# Use the same password that you used to connect to the [https://juno.calculquebec.ca/ Juno web page].&lt;br /&gt;
# you can now create the credentials&lt;br /&gt;
$ openstack ec2 credentials create&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
| Field      | Value                                                                                                                                                                       |&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
| access     | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                                                                                                                            |&lt;br /&gt;
| links      | {&#039;self&#039;: &#039;https://juno.calculquebec.ca:5000/v3/users/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/credentials/OS-EC2/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#039;} |&lt;br /&gt;
| project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                                                            |&lt;br /&gt;
| secret     | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                                                            |&lt;br /&gt;
| trust_id   | None                                                                                                                                                                        |&lt;br /&gt;
| user_id    | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                            |&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important values here are &amp;lt;code&amp;gt;access&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;which are the S3 [aws_]access_key_id and [aws_]secret_access_key respectively. AWS stands for Amazon Web Services, they are the creator of the S3 API.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Manage you S3 buckets with Globus =&lt;br /&gt;
&lt;br /&gt;
See the [[Globus]] documentation&lt;br /&gt;
&lt;br /&gt;
= Use a S3 client to manage your bucket =&lt;br /&gt;
There are a few clients that can be used to access Ceph S3 api. We recomend [[rclone]], it is fast and and flexible.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Store_and_Share_data&amp;diff=165</id>
		<title>Store and Share data</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Store_and_Share_data&amp;diff=165"/>
		<updated>2025-05-20T17:37:36Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Fonts.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Intro=&lt;br /&gt;
SD4H has a large Object Store. Objects are accessible through a web API via the Rados Gateway (radosgw) service. Both the S3 and swift API standards are supported by the radosgw.&lt;br /&gt;
&lt;br /&gt;
In an Object Store, an object is the equivalent of a file on a posix file system. The object store gives users a lot of flexibility, but the steps to do simple tasks like sharing and transferring data involve somewhat of a learning cure. We propose a procedure here so this curve is as gentle as possible. Once done, the procedure will be both more secure and more flexible than sharing data on a share HPC platform or on some VM owned by your group.   &lt;br /&gt;
&lt;br /&gt;
= Configuring S3 access =&lt;br /&gt;
&lt;br /&gt;
# You first need to have your [[OpenStack Client]] installed and configured. &lt;br /&gt;
# Then, with the client you generate an e2c/S3 id and secret&lt;br /&gt;
&lt;br /&gt;
With the client is installed and the RC files downloaded in step 1 you can create the S3 ID and secret. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
$ source  $HOME/id/myproject-openrc.sh&lt;br /&gt;
Please enter your OpenStack Password for project po-test as user poq: &lt;br /&gt;
# Use the same password that you used to connect to the [https://juno.calculquebec.ca/ Juno web page].&lt;br /&gt;
# you can now create the credentials&lt;br /&gt;
$ openstack ec2 credentials create&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
| Field      | Value                                                                                                                                                                       |&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
| access     | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                                                                                                                            |&lt;br /&gt;
| links      | {&#039;self&#039;: &#039;https://juno.calculquebec.ca:5000/v3/users/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/credentials/OS-EC2/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#039;} |&lt;br /&gt;
| project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                                                            |&lt;br /&gt;
| secret     | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                                                            |&lt;br /&gt;
| trust_id   | None                                                                                                                                                                        |&lt;br /&gt;
| user_id    | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                            |&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important values here are &amp;lt;code&amp;gt;access&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;which are the S3 [aws_]access_key_id and [aws_]secret_access_key respectively. AWS stands for Amazon Web Services, they are the creator of the S3 API.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Manage you S3 buckets with Globus =&lt;br /&gt;
&lt;br /&gt;
See the [[Globus]] documentation&lt;br /&gt;
&lt;br /&gt;
= Use a S3 client to manage your bucket =&lt;br /&gt;
There are a few clients that can be used to access Ceph S3 api. We recomend [[rclone]], it is fast and and flexible.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Store_and_Share_data&amp;diff=164</id>
		<title>Store and Share data</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Store_and_Share_data&amp;diff=164"/>
		<updated>2025-05-20T17:36:34Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Fonts only.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Intro=&lt;br /&gt;
SD4H has a large Object Store. Objects are accessible through a web API via the Rados Gateway (radosgw) service. Both the S3 and swift API standards are supported by the radosgw.&lt;br /&gt;
&lt;br /&gt;
In an Object Store, an object is the equivalent of a file on a posix file system. The object store gives users a lot of flexibility, but the steps to do simple tasks like sharing and transferring data involve somewhat of a learning cure. We propose a procedure here so this curve is as gentle as possible. Once done, the procedure will be both more secure and more flexible than sharing data on a share HPC platform or on some VM owned by your group.   &lt;br /&gt;
&lt;br /&gt;
= Configuring S3 access =&lt;br /&gt;
&lt;br /&gt;
# You first need to have your [[OpenStack Client]] installed and configured. &lt;br /&gt;
# Then, with the client you generate an e2c/S3 id and secret&lt;br /&gt;
&lt;br /&gt;
With the client is installed and the RC files downloaded in step 1 you can create the S3 ID and secret. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
$ source  $HOME/id/myproject-openrc.sh&lt;br /&gt;
Please enter your OpenStack Password for project po-test as user poq: &lt;br /&gt;
# Use the same password that you used to connect to the [https://juno.calculquebec.ca/ Juno web page].&lt;br /&gt;
# you can now create the credentials&lt;br /&gt;
$ openstack ec2 credentials create&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
| Field      | Value                                                                                                                                                                       |&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
| access     | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX                                                                                                                                            |&lt;br /&gt;
| links      | {&#039;self&#039;: &#039;https://juno.calculquebec.ca:5000/v3/users/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/credentials/OS-EC2/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&#039;} |&lt;br /&gt;
| project_id | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                                                            |&lt;br /&gt;
| secret     | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                                                            |&lt;br /&gt;
| trust_id   | None                                                                                                                                                                        |&lt;br /&gt;
| user_id    | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                                                                                            |&lt;br /&gt;
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The important values here are &amp;lt;code&amp;gt;access&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;which are the S3 [aws_]access_key_id and [aws_]secret_access_key respectively. AWS stands for Amazon Web Services, they are the creator of the S3 API.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Manage you S3 buckets with Globus=&lt;br /&gt;
&lt;br /&gt;
See the [[Globus]] documentation&lt;br /&gt;
&lt;br /&gt;
=Use a S3 client to manage your bucket=&lt;br /&gt;
There are a few clients that can be used to access Ceph S3 api. We recomend [[rclone]], it is fast and and flexible.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Object_Store_Quick_Start&amp;diff=162</id>
		<title>Object Store Quick Start</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Object_Store_Quick_Start&amp;diff=162"/>
		<updated>2025-04-25T14:21:40Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This section covers the required steps to get started with SD4H&#039;s object store.&lt;br /&gt;
&lt;br /&gt;
Some operations can be made in the OpenStack GUI, but features are limited.&lt;br /&gt;
CLI tools offer more control and will allow programmatic access to object store resources. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* Install and configure your [[OpenStack_Client|OpenStack CLI]]&lt;br /&gt;
&lt;br /&gt;
== API endpoints ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Object Store API Endpoints&lt;br /&gt;
!Object Store API&lt;br /&gt;
!Endpoint&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Swift&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://objets.juno.calculquebec.ca/swift/v1&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;S3&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;https://objets.juno.calculquebec.ca&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+Project Specific Endpoint Patterns (for public READ buckets)&lt;br /&gt;
!Object Store API&lt;br /&gt;
!Project endpoint pattern&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;Swift&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;endpoint&amp;gt;/&#039;&#039;&#039;AUTH_&amp;lt;PROJECT ID&amp;gt;/&amp;lt;CONTAINER&amp;gt;/&amp;lt;OBJECT&amp;gt;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;&#039;S3&#039;&#039;&#039;&lt;br /&gt;
|&amp;lt;code&amp;gt;&amp;lt;endpoint&amp;gt;/&#039;&#039;&#039;&amp;lt;PROJECT ID&amp;gt;:&amp;lt;CONTAINER&amp;gt;/&amp;lt;OBJECT&amp;gt;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Getting credentials for the object store ==&lt;br /&gt;
&lt;br /&gt;
=== The Swift Api ===&lt;br /&gt;
You can get access to the [https://docs.openstack.org/swift/latest/api/object_api_v1_overview.html Object Store swift Api]  directly with the same RC file credential that you created for the Openstack client in the prerequisites step, and the official [https://pypi.org/project/python-swiftclient/ Openstack Swift client]. &lt;br /&gt;
&lt;br /&gt;
Note that while the S3 Api is more feature rich and has better support, some operations can only be done with the Swift Api which is the native OpenStack Object Store Api. For example, to get the Quota of you account:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight ,lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 $ source $HOME/id/myproject-openrc.sh # created for the OpenStack client&lt;br /&gt;
 $ swift stat --lh&lt;br /&gt;
                                    Account: AUTH_d5f8b8e8e3e2442f81573b2f0951013b&lt;br /&gt;
                                 Containers: 11&lt;br /&gt;
                                    Objects: 2.0M&lt;br /&gt;
                                      Bytes: 1.1P&lt;br /&gt;
                                Quota Bytes: 1.5P&lt;br /&gt;
   Containers in policy &amp;quot;default-placement&amp;quot;: 11&lt;br /&gt;
      Objects in policy &amp;quot;default-placement&amp;quot;: 2.0M&lt;br /&gt;
        Bytes in policy &amp;quot;default-placement&amp;quot;: 1.1P&lt;br /&gt;
Objects in policy &amp;quot;default-placement-bytes&amp;quot;: 0&lt;br /&gt;
  Bytes in policy &amp;quot;default-placement-bytes&amp;quot;: 0&lt;br /&gt;
                      Meta Quota-Containers: 1000&lt;br /&gt;
                                X-Timestamp: 1745522890.88092&lt;br /&gt;
                X-Account-Bytes-Used-Actual: 1287786000326656&lt;br /&gt;
                                 X-Trans-Id: tx0000058e846920f427dfe-00680a90ca-83214639-default&lt;br /&gt;
                     X-Openstack-Request-Id: tx0000058e846920f427dfe-00680a90ca-83214639-default&lt;br /&gt;
                              Accept-Ranges: bytes&lt;br /&gt;
                               Content-Type: text/plain; charset=utf-8&lt;br /&gt;
                                     Server: Ceph Object Gateway (squid)&lt;br /&gt;
                                 Connection: close&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You see here an account with 11 Containers (Swift&#039;s Containers are S3 Buckets) 2 Million objects, and 1.1 PB used out of its 1.5 PB quota.&lt;br /&gt;
&lt;br /&gt;
=== The S3 Api ===&lt;br /&gt;
While the Switft API can be accessed with the OpenStack RC file credentials, the S3 object store maintains its own set of credentials.&lt;br /&gt;
&lt;br /&gt;
To create S3 credentials for a project/user:&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
openstack ec2 credentials create&lt;br /&gt;
&lt;br /&gt;
+------------+--------------------------------------------------------------------------------------------------+&lt;br /&gt;
| Field      | Value                                                                                            |&lt;br /&gt;
+------------+--------------------------------------------------------------------------------------------------+&lt;br /&gt;
| access     | &amp;lt;S3 ACCESS KEY&amp;gt;                                                                                  |&lt;br /&gt;
| links      | {&#039;self&#039;: &#039;https://juno.calculquebec.ca:5000/v3/users/&amp;lt;USER ID&amp;gt;/credentials/OS-EC2/&amp;lt;ACCESS KEY&amp;gt;&#039;} |&lt;br /&gt;
| project_id | &amp;lt;OPENSTACK PROJECT ID&amp;gt;                                                                           |&lt;br /&gt;
| secret     | &amp;lt;S3 SECRET KEY&amp;gt;                                                                                  |&lt;br /&gt;
| trust_id   | None                                                                                             |&lt;br /&gt;
| user_id    | &amp;lt;USER ID&amp;gt;                                                                                        |&lt;br /&gt;
+------------+--------------------------------------------------------------------------------------------------+&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Usage details coming soon!&lt;br /&gt;
&lt;br /&gt;
=== Using the Object Store ===&lt;br /&gt;
Consider using [[rclone]] to access and work with the Object Store.&lt;br /&gt;
&lt;br /&gt;
==What an Object Store is and isn&#039;t==&lt;br /&gt;
(from https://github.com/s3fs-fuse/s3fs-fuse?tab=readme-ov-file#limitations)&lt;br /&gt;
&lt;br /&gt;
Generally, an Object Store cannot offer the same performance or semantics as a local file system.  More specifically:&lt;br /&gt;
&lt;br /&gt;
*random writes or appends to files require rewriting the entire object, optimized with multi-part upload copy&lt;br /&gt;
*metadata operations such as listing directories have poor performance due to network latency&lt;br /&gt;
*non-AWS providers may have eventual consistency so reads can temporarily yield stale data (AWS offers read-after-write consistency since Dec 2020)&lt;br /&gt;
*no atomic renames of files or directories&lt;br /&gt;
*no coordination between multiple clients mounting the same bucket&lt;br /&gt;
*no hard links&lt;br /&gt;
*inotify detects only local modifications, not external ones by other clients or tools&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=154</id>
		<title>Rclone</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=154"/>
		<updated>2025-04-24T17:49:42Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://rclone.org/ Rclone] is a powerful client that can interact with multiple storage backends, it offers a good support for our Ceph version of the S3 api and has good speed transfer out of the box.  It can also be used to mount an Object Store as traditional block file storage.  &lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
First [https://rclone.org/downloads/ download rclone] or use the [https://rclone.org/install/#script-installation script installation].  Then [[Store_and_Share_data#Configuring_S3_access|get your S3 &amp;lt;code&amp;gt;id key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;]] from Open Stack.&lt;br /&gt;
&lt;br /&gt;
Create the following file:  &lt;br /&gt;
&lt;br /&gt;
  ~/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
access_key_id = &amp;lt;S3 ID from previous step&amp;gt;&lt;br /&gt;
secret_access_key = &amp;lt;S3 secret from previous step&amp;gt;&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
acl = private&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then list current bucket, create a bucket and then copy a file into it,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
$rclone mkdir   c3g-prod:test&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
          -1 2025-04-15 18:08:32        -1 test&lt;br /&gt;
$rclone copy my-file.txt my-project:test&lt;br /&gt;
$rclone ls  my-project:test/&lt;br /&gt;
    12408 my-file.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mounting an Object Store ==&lt;br /&gt;
To allow mounting by non-root users, in /etc/fuse.conf, uncomment:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user_allow_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Mount the Object Store in daemon mode with:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/dir --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
#rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;A service may be used to auto-mount the Object Store on boot with a service file (in /etc/systemd/system/).&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Mount the ihec_data_objstr, even after a restart&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=My Object Store automount&lt;br /&gt;
After=network.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/point/dir --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
# ExecStart=/usr/bin/rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
ExecStop=/usr/bin/fusermount -u /mnt/ihec_data_objstr&lt;br /&gt;
Restart=always&lt;br /&gt;
SyslogIdentifier=ihec_data_objstr&lt;br /&gt;
User=ihec&lt;br /&gt;
Group=ihec&lt;br /&gt;
Environment=RCLONE_CONFIG=/home/ihec/.config/rclone/rclone.conf&lt;br /&gt;
TimeoutStopSec=30&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;enable and start the service.&lt;br /&gt;
&lt;br /&gt;
== Mounting a public Object Store without using credentials ==&lt;br /&gt;
Public Object Stores may be accessed or mounted as read-only without the use of Open Stack credentials.  This relies on a bucket syntax prepended with the Open Stack project ID.&lt;br /&gt;
&lt;br /&gt;
Your ~/.config/rclone/rclone.conf need not contain an access_key_id and secret_access_key but only:&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-public-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Then combine the OS project ID and the bucket name like so:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone lsd my-public-project:&amp;lt;OS project ID&amp;gt;:&amp;lt;bucket name&amp;gt;&lt;br /&gt;
# For example:&lt;br /&gt;
# rclone lsd my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data&lt;br /&gt;
# or&lt;br /&gt;
# rclone mount my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== No problems, only solutions ==&lt;br /&gt;
&lt;br /&gt;
1. I cannot upload file larger than 48GB. &lt;br /&gt;
 In some situation rclone is not able to guess the size of the file to upload and use the default value of`--s3-chunk-size 5M` to spit and upload file to the bucket. But since the server has a 10,000 chunk limit, the upload crashes. You can solve that by setting a larger  value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone copy --s3-chunk-size 50M my-large-file.cram  my-project:test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you need the ram of your computer to be larger that chunks.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=153</id>
		<title>Rclone</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=153"/>
		<updated>2025-04-24T17:46:56Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://rclone.org/ Rclone] is a powerful client that can interact with multiple storage backends, it offers a good support for our Ceph version of the S3 api and has good speed transfer out of the box.  It can also be used to mount an Object Store as traditional block file storage.  &lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
First [https://rclone.org/downloads/ download rclone] or use the [https://rclone.org/install/#script-installation script installation].  Then [[Store_and_Share_data#Configuring_S3_access|get your S3 &amp;lt;code&amp;gt;id key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;]] from Open Stack.&lt;br /&gt;
&lt;br /&gt;
Create the following file:  &lt;br /&gt;
&lt;br /&gt;
  ~/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
access_key_id = &amp;lt;S3 ID from previous step&amp;gt;&lt;br /&gt;
secret_access_key = &amp;lt;S3 secret from previous step&amp;gt;&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
acl = private&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then list current bucket, create a bucket and then copy a file into it,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
$rclone mkdir   c3g-prod:test&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
          -1 2025-04-15 18:08:32        -1 test&lt;br /&gt;
$rclone copy my-file.txt my-project:test&lt;br /&gt;
$rclone ls  my-project:test/&lt;br /&gt;
    12408 my-file.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mounting an Object Store ==&lt;br /&gt;
To allow mounting by non-root users, in /etc/fuse.conf, uncomment:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user_allow_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Mount the Object Store in daemon mode with:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/dir --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
#rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;A service may be used to auto-mount the Object Store on boot with a service file (in /etc/systemd/system/).&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Mount the ihec_data_objstr, even after a restart&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=My Object Store automount&lt;br /&gt;
After=network.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/point/dir --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
# ExecStart=/usr/bin/rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
ExecStop=/usr/bin/fusermount -u /mnt/ihec_data_objstr&lt;br /&gt;
Restart=always&lt;br /&gt;
SyslogIdentifier=ihec_data_objstr&lt;br /&gt;
User=ihec&lt;br /&gt;
Group=ihec&lt;br /&gt;
Environment=RCLONE_CONFIG=/home/ihec/.config/rclone/rclone.conf&lt;br /&gt;
TimeoutStopSec=30&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mounting a public Object Store without using credentials ==&lt;br /&gt;
Public Object Stores may be accessed or mounted as read-only without the use of Open Stack credentials.  This relies on a bucket syntax prepended with the Open Stack project ID.&lt;br /&gt;
&lt;br /&gt;
Your ~/.config/rclone/rclone.conf need not contain an access_key_id and secret_access_key but only:&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-public-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Then combine the OS project ID and the bucket name like so:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone lsd my-public-project:&amp;lt;OS project ID&amp;gt;:&amp;lt;bucket name&amp;gt;&lt;br /&gt;
# For example:&lt;br /&gt;
# rclone lsd my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data&lt;br /&gt;
# or&lt;br /&gt;
# rclone mount my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== No problems, only solutions ==&lt;br /&gt;
&lt;br /&gt;
1. I cannot upload file larger than 48GB. &lt;br /&gt;
 In some situation rclone is not able to guess the size of the file to upload and use the default value of`--s3-chunk-size 5M` to spit and upload file to the bucket. But since the server has a 10,000 chunk limit, the upload crashes. You can solve that by setting a larger  value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone copy --s3-chunk-size 50M my-large-file.cram  my-project:test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you need the ram of your computer to be larger that chunks.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=152</id>
		<title>Rclone</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Rclone&amp;diff=152"/>
		<updated>2025-04-24T17:45:56Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Added mount (public and private) sections.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://rclone.org/ Rclone] is a powerful client that can interact with multiple storage backends, it offers a good support for our Ceph version of the S3 api and has good speed transfer out of the box.  It can also be used to mount an Object Store as traditional block file storage.  &lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
First [https://rclone.org/downloads/ download rclone] or use the [https://rclone.org/install/#script-installation script installation].  Then [[Store_and_Share_data#Configuring_S3_access|get your S3 &amp;lt;code&amp;gt;id key&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;secret&amp;lt;/code&amp;gt;]] from Open Stack.&lt;br /&gt;
&lt;br /&gt;
Create the following file:  &lt;br /&gt;
&lt;br /&gt;
  ~/.config/rclone/rclone.conf&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
access_key_id = &amp;lt;S3 ID from previous step&amp;gt;&lt;br /&gt;
secret_access_key = &amp;lt;S3 secret from previous step&amp;gt;&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
acl = private&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then list current bucket, create a bucket and then copy a file into it,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
$rclone mkdir   c3g-prod:test&lt;br /&gt;
$rclone lsd my-project:&lt;br /&gt;
          -1 2024-01-19 14:12:34        -1 backups&lt;br /&gt;
          -1 2024-03-07 14:23:26        -1 my-bucket&lt;br /&gt;
          -1 2025-04-15 18:08:32        -1 test&lt;br /&gt;
$rclone copy my-file.txt my-project:test&lt;br /&gt;
$rclone ls  my-project:test/&lt;br /&gt;
    12408 my-file.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mounting an Object Store ==&lt;br /&gt;
To allow mounting by non-root users, in /etc/fuse.conf, uncomment:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
user_allow_other&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Mount the Object Store in daemon mode with:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/dir --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
#rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;A service may be used to auto-mount the Object Store on boot with a service file (in /etc/systemd/system/).&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# Mount the ihec_data_objstr, even after a restart&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=My Object Store automount&lt;br /&gt;
After=network.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/rclone mount &amp;lt;rclone config block&amp;gt;:&amp;lt;bucket&amp;gt; /path/to/mount/point/dir --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
# For example:&lt;br /&gt;
# ExecStart=/usr/bin/rclone mount c3g-data-repos:ihec_data /mnt/ihec_data_objstr --no-modtime --fast-list --transfers 50 --checkers 50 --allow-other --read-only&lt;br /&gt;
ExecStop=/usr/bin/fusermount -u /mnt/ihec_data_objstr&lt;br /&gt;
Restart=always&lt;br /&gt;
SyslogIdentifier=ihec_data_objstr&lt;br /&gt;
User=ihec&lt;br /&gt;
Group=ihec&lt;br /&gt;
Environment=RCLONE_CONFIG=/home/ihec/.config/rclone/rclone.conf&lt;br /&gt;
TimeoutStopSec=30&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mounting a public Object Store without using credentials ==&lt;br /&gt;
Public Object Stores may be accessed or mounted as read-only without the use of Open Stack credentials.  This relies on a bucket syntax that includes the Open Stack project ID.&lt;br /&gt;
&lt;br /&gt;
Your ~/.config/rclone/rclone.conf need not contain an access_key_id and secret_access_key but only:&amp;lt;syntaxhighlight lang=&amp;quot;ini&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
[my-public-project]&lt;br /&gt;
type = s3&lt;br /&gt;
provider = Other&lt;br /&gt;
env_auth = false&lt;br /&gt;
endpoint = https://objets.juno.calculquebec.ca&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Then combine the OS project ID and the bucket name like so:&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
rclone lsd my-public-project:&amp;lt;OS project ID&amp;gt;:&amp;lt;bucket name&amp;gt;&lt;br /&gt;
# For example:&lt;br /&gt;
# rclone lsd my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data&lt;br /&gt;
# or&lt;br /&gt;
# rclone mount my-public-project:d5f8b8e8e3e2442f81573b2f0951013b:ihec_data /mnt/ihec_data_objstr --daemon --daemon-wait 0 --allow-other --read-only&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== No problems, only solutions ==&lt;br /&gt;
&lt;br /&gt;
1. I cannot upload file larger than 48GB. &lt;br /&gt;
 In some situation rclone is not able to guess the size of the file to upload and use the default value of`--s3-chunk-size 5M` to spit and upload file to the bucket. But since the server has a 10,000 chunk limit, the upload crashes. You can solve that by setting a larger  value:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$rclone copy --s3-chunk-size 50M my-large-file.cram  my-project:test&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that you need the ram of your computer to be larger that chunks.&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
	<entry>
		<id>https://wiki.c3g-app.sd4h.ca/index.php?title=Object_Store_Quick_Start&amp;diff=150</id>
		<title>Object Store Quick Start</title>
		<link rel="alternate" type="text/html" href="https://wiki.c3g-app.sd4h.ca/index.php?title=Object_Store_Quick_Start&amp;diff=150"/>
		<updated>2025-04-24T16:54:48Z</updated>

		<summary type="html">&lt;p&gt;Dbrownlee: Basic description of an Obj Store&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
This section covers the required steps to get started with SD4H&#039;s object store.&lt;br /&gt;
&lt;br /&gt;
Some operations can be made in the OpenStack GUI, but features are limited.&lt;br /&gt;
CLI tools offer more control and will allow programmatic access to object store resources. &lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
* Install and configure your [[OpenStack_Client|OpenStack CLI]]&lt;br /&gt;
&lt;br /&gt;
== Getting credentials for the object store ==&lt;br /&gt;
&lt;br /&gt;
The object store maintains its own set of credentials.&lt;br /&gt;
&lt;br /&gt;
== What an Object Store is and isn&#039;t ==&lt;br /&gt;
(from https://github.com/s3fs-fuse/s3fs-fuse?tab=readme-ov-file#limitations)&lt;br /&gt;
&lt;br /&gt;
Generally, an Object Store cannot offer the same performance or semantics as a local file system.  More specifically:&lt;br /&gt;
&lt;br /&gt;
* random writes or appends to files require rewriting the entire object, optimized with multi-part upload copy&lt;br /&gt;
* metadata operations such as listing directories have poor performance due to network latency&lt;br /&gt;
* non-AWS providers may have eventual consistency so reads can temporarily yield stale data (AWS offers read-after-write consistency since Dec 2020)&lt;br /&gt;
* no atomic renames of files or directories&lt;br /&gt;
* no coordination between multiple clients mounting the same bucket&lt;br /&gt;
* no hard links&lt;br /&gt;
* inotify detects only local modifications, not external ones by other clients or tools&lt;/div&gt;</summary>
		<author><name>Dbrownlee</name></author>
	</entry>
</feed>