Hi there,
On a Debian/Ubuntu box, I have installed: forticlient_vpn_7.0.7.0246_amd64.deb, which using the command line "not Desktop" just bash.
I am able to connect to the company VPN using a syntax like:
/opt/forticlient/vpn -s office.***.com:_PORT_GOES_HERE_ -u MY_USERNAME -p
password:
State: Connecting
...
I was wondering how I can pass the password when the VPN app asks for, or if there is other parameter?
Thanks in advance.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Are you wanting to pass the password in the command line arguments to avoid having it be interactive?
yes, I'd like that.
DO any of these CLI options help you? Looks like you can create a profile that you reference in the CLI arguments...
I am not sure about what you are mentioning, I am not familiar with that one.
I'd like to be able to pass to the "FortiClient" VPN binary, like other VPN software I have worked with "using CLI" where I can pass the password, the same way I pass username and other parameters.
I am able to use 'expect' this way, but it's hacky
expect expect_response.exp 'passwordGoesHere'
Running on Ubuntu 20.04 LTS, but I assume for Debian 10/11 should work as well.
content of file: expect_response.exp it expects one parameter:
#!/usr/bin/expect
set PASS [lindex $argv 0]
set timeout -1
spawn /opt/forticlient/vpn -s officeAddressAndPortGoesHere -u myUserNameGoesHere -p
expect -exact "password:"
send -- "$PASS\r"
set timeout -1
expect eof
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1720 | |
1093 | |
752 | |
447 | |
234 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.