Skip to content

Commit

Permalink
Merge pull request #16 from psm-compute/vpn
Browse files Browse the repository at this point in the history
added vpn page
  • Loading branch information
simongravelle authored Nov 1, 2024
2 parents fad2b57 + f9d81c8 commit 1944c7d
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ start a discussion on |GitHub_discussion|.
oar
lammps
git
vpn

.. toctree::
:maxdepth: 1
Expand Down
40 changes: 40 additions & 0 deletions docs/source/vpn.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
VPN tips
========

To automaticaly connect to the UGA VPN, you can
create a bash script named `vpn-connect.sh` and
containing the following information:

.. code:: bash
#!/bin/bash
# Define VPN server, username, password, and group
VPN_SERVER="vpn.grenet.fr"
VPN_USER="your-username-here"
VPN_PASSWORD="your-password-here"
VPN_GROUP="Personnels de l' UGA"
# Path to the log file
OCLOG="$HOME/vpn_connection.log"
echo "Connecting to VPN at $VPN_SERVER with username $VPN_USER"
echo "You may be prompted for your sudo password if necessary..."
# Use openconnect with protocol, group, and password provided via echo
echo "$VPN_PASSWORD" | sudo openconnect --protocol=anyconnect --authgroup="$VPN_GROUP" --user="$VPN_USER" "$VPN_SERVER" --passwd-on-stdin | tee -a "$OCLOG"
echo "VPN connection established. Logs can be found at $OCLOG"
WARNING
-------

You don't have to save your password in `vpn-connect.sh`.
If you leave the `VPN_PASSWORD` blank, you will be prompted
to type your password. If you choose to write your password in
the file, you can still protect the file using:

.. code:: bash
sudo chown root:root vpn-connect.sh
sudo chmod 700 vpn-connect.sh

0 comments on commit 1944c7d

Please sign in to comment.