Navigate to:
https://sourceforge.net/auth/preferences/#multifactor
You will find the following section to start the process:
The next page will reveal a barcode to scan into your authentication device. You will need to install an app on your device for this step. Some options are listed below:
App | Android | Iphone | Windows Phone |
---|---|---|---|
Google Authenticator | Yes | Yes | No |
Duo Mobile | Yes | Yes | Yes |
FreeOTP Authenticator | Yes | Yes | No |
Toopher | Yes | Yes | No |
Authy | Yes | Yes | No |
Authenticator | No | No | Yes |
2FA | No | No | Yes |
Once the app of your choice is installed use it to scan the barcode displayed in the browser and your account will automatically be added. Use the app to generate a 6-digit code and enter that to finalize multifactor authentication.
The following screenshot shows the setup in Duo Mobile:
Anytime you login to your SourceForge Account or use Shell Services (without ssh keys setup): select the key icon to generate a code.
You will receive an email confirming 2 factor authorization as enabled. The account screen will now also display multifactor as enabled along with adjustment settings:
Multi factor settings can be found in account settings.
https://sourceforge.net/auth/preferences/#multifactor
Here you can:
Recovery codes are used in case the authorization device is lost. They can be viewed or changed at any point but please note you will not be able to log in and view them without first logging into your account. Save them someplace safe somewhere else.
If ssh keys are not setup for the current account you will need to use your password combined with your 6-digit auth code whenever prompted. In the event of multiple prompts, make sure to generate a new auth code.
Below are examples of accessing different shell services with 2 factor auth enabled and no ssh key setup:
scp
[jsmith]$ scp example.txt jsmith@frs.sourceforge.net:/home/frs/project/fooproject
Password: password123456
placeholder.txt
sftp
[jsmith]$ sftp jsmith@frs.sourceforge.net
Password: password123456
Connected to frs.sourceforge.net.
sftp>
rsync
[jsmith]$ rsync -avP -e ssh example.txt jsmith@frs.sourceforge.net:/home/frs/project/fooproject
Password: password123456
sending incremental file list
example.txt
11 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/1)
sent 124 bytes received 35 bytes 7.76 bytes/sec
total size is 11 speedup is 0.07
Git clone via https
[jsmith]$ git clone https://jsmith@git.code.sf.net/p/fooproject/code fooproject-code
Cloning into 'fooproject-code'...
Password for 'https://jsmith@git.code.sf.net': password123456
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 11 (delta 3), reused 0 (delta 0)
Unpacking objects: 100% (11/11), done.
Checking connectivity... done.
SVN Commit
[jsmith]$ svn add example.txt
svn commit -m "Connect with 2-factor auth"
Authentication realm: <https://svn.code.sf.net:443> SourceForge User
Username: jsmith
Password for 'jsmith': password123456
Adding example.txt
Transmitting file data .done
Committing transaction...
Committed revision 3.