SFTP Account Management
Intro
This page explains how the create and delete account on the Covid sFTP Server. Most of the time, these accounts are used by the organisations that are sending data to be processed. There are a few exceptions for pushing exports of data, but these have been replaced by the replication as much as possible.
Tools
To be able to complete the steps, you need to have access to the following information:
- Launch Putty from the Citrix WebPage
- Connect to the sFTP Server using the sciensano account
- Have access to the shared KeyPass
It is better if you have (even basic) knowledge of the Linux command line. If you don't, be aware that Linux paths are case sensitive… this can be the source of many issues. Trick using Putty, you can paste by right clicking when the app has the focus.
Startup
Start the following tools as they will be needed for the next steps:
Open the Covid Share KeyPass
Go to \\CVD-P-SAS01\Tools and launch KeePass
Start Putty
From the Citrix Portal, start Putty Connect to server 10.72.144.46
User
sciensano
Password
Look it up in the COVID Shared KeyPass (the one labeled SFTP Account 2)
Adding an user
- Open the sFTP Folder in the KeePass
- Create the new user in KeePass (password gets generated automatically)
- If the user is for a Data Provider, check in file Covid19CC_DATAProviders (Dropbox\HD_Projects\HD9999_COVID19_Lab\COVID19_Lab_Follow_Up) for the user name (login)
- If the user is for the (Lime)Hosp project, use the hospital name and add _hosp at the end of the login name.
- Don’t forget the save the KeyPass update
- Using Putty, go to folder covid-sftp
cd covid-sftp - Use the Helper script to generate the required content for the next steps.
- Delete to output file of the helper script (if it exists)
rm to_add.txt - Execute the helper script for each new user to add
./add.sh
Reply to the prompts for user name and password for the new users(s) - Check the output of the script to make sure all is OK
- Delete to output file of the helper script (if it exists)
- Print the content of the output file so you can copy/paste it.
cat to_add.txt - Copy the printed text (just selecting text in Putty copies it).
- Copy WHOLE lines, the indentation is very important.
- Once you have copied the content in a safe place (you’ll need it later). Delete the output of the helper script.
rm to_add.txt
- Go to folder ansible/group_vars/ngsusers/
cd ansible/group_vars/ngsusers/ - Edit file vars
nano vars- go to the end of the file (you can use PageDown / Arrow Keys, nano is nicer than vi)
- paste the content copied at the end of step 6 at the end of the file
make sure that indentation is the same of the previous line and that there are no empty lines in the list of users - save the updated file (CTRL-X and follow the prompts at the bottom)
docs.healthdata.be