Provide user and password for connection via CLI

Got a problem with Viscosity or need help? Ask here!

Oleksii

Posts: 2
Joined: Fri Sep 29, 2023 9:43 pm

Post by Oleksii » Fri Sep 29, 2023 9:50 pm
Hi, I am trying to find a way to use Viscosity from CLI. My setup is:
1. I already have a connection (imported) in Viscosity.
2. I don't save user/password for this connection - password is dynamic.
3. I want to trigger Viscosity connection from CLI, providing user and password as arguments.

Something like :
$ viscosity connect connection_name user_name password

Is it possible?
If yes - could you point me towards the docs to do it?
I've done a share of googling but could not find anything.

Thank you

James

User avatar
Posts: 2361
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Sat Sep 30, 2023 7:48 am
Hi Oleksii,

You can't specify the username and password on the command line, however you can specify them in a Before Connect script. For more information please see:
https://www.sparklabs.com/support/kb/ar ... redentials

If you're not saving your password because it's a combination of a password and a two-factor credential (such as a code or OTP), then you may also like to look at using the "static-challenge-password" command instead:
https://www.sparklabs.com/support/kb/ar ... e-password

Cheers,
James
Web: https://www.sparklabs.com
Support: https://www.sparklabs.com/support
Twitter: https://twitter.com/sparklabs

Oleksii

Posts: 2
Joined: Fri Sep 29, 2023 9:43 pm

Post by Oleksii » Sun Oct 01, 2023 12:16 am
Thanks a lot, this fully covers my needs :)
3 posts Page 1 of 1