-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from psm-compute/vpn
added vpn page
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ start a discussion on |GitHub_discussion|. | |
oar | ||
lammps | ||
git | ||
vpn | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |