How to use openconnect with username and password at a line in terminal?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I use openconnect
in Ubuntu 16.04 terminally, when I want to enable it, I need to enter three phases that contain the:
- "yes/no"
- "username"
- "password"
How can I bypass these phases by using openconnect
at a line (e.g. using openconnect
options)?
Is there any options for that such as following?
sudo openconnect <server-name> --user=<'username'> --pass=<'password'>
I used openconnect --help
and found a way for username, but for password and ssl verification have problem yet.
16.04 command-line konsole openconnect
add a comment |Â
up vote
0
down vote
favorite
I use openconnect
in Ubuntu 16.04 terminally, when I want to enable it, I need to enter three phases that contain the:
- "yes/no"
- "username"
- "password"
How can I bypass these phases by using openconnect
at a line (e.g. using openconnect
options)?
Is there any options for that such as following?
sudo openconnect <server-name> --user=<'username'> --pass=<'password'>
I used openconnect --help
and found a way for username, but for password and ssl verification have problem yet.
16.04 command-line konsole openconnect
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I use openconnect
in Ubuntu 16.04 terminally, when I want to enable it, I need to enter three phases that contain the:
- "yes/no"
- "username"
- "password"
How can I bypass these phases by using openconnect
at a line (e.g. using openconnect
options)?
Is there any options for that such as following?
sudo openconnect <server-name> --user=<'username'> --pass=<'password'>
I used openconnect --help
and found a way for username, but for password and ssl verification have problem yet.
16.04 command-line konsole openconnect
I use openconnect
in Ubuntu 16.04 terminally, when I want to enable it, I need to enter three phases that contain the:
- "yes/no"
- "username"
- "password"
How can I bypass these phases by using openconnect
at a line (e.g. using openconnect
options)?
Is there any options for that such as following?
sudo openconnect <server-name> --user=<'username'> --pass=<'password'>
I used openconnect --help
and found a way for username, but for password and ssl verification have problem yet.
16.04 command-line konsole openconnect
edited Jul 20 at 8:44
asked Jun 2 at 19:43
![](https://i.stack.imgur.com/1qTTp.jpg?s=32&g=1)
![](https://i.stack.imgur.com/1qTTp.jpg?s=32&g=1)
Benyamin Jafari
17012
17012
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
If you type man openconnect
in a terminal you will get a manual page describing usage.
Relevant sections:
-u,--user=NAME
Set login username to NAME
--passwd-on-stdin
Read password from standard input
Additionally, you may need to disable certificate warnings:
--no-cert-check
Do not require server SSL certificate to be valid. Checks will still happen and failures will cause a warning message, but the connection will continue anyway. You should not need to use this option - if your servers have SSL certificates which are not signed by a trusted Certificate Authority, you can still add them (or your private CA) to a local file and use that file with the --cafile option.
Or you could add the certificate to a file.
All this can be combined:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin --no-cert-check
Thanks, it works, but needed thesudo
.
â Benyamin Jafari
Jun 2 at 20:55
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
If you type man openconnect
in a terminal you will get a manual page describing usage.
Relevant sections:
-u,--user=NAME
Set login username to NAME
--passwd-on-stdin
Read password from standard input
Additionally, you may need to disable certificate warnings:
--no-cert-check
Do not require server SSL certificate to be valid. Checks will still happen and failures will cause a warning message, but the connection will continue anyway. You should not need to use this option - if your servers have SSL certificates which are not signed by a trusted Certificate Authority, you can still add them (or your private CA) to a local file and use that file with the --cafile option.
Or you could add the certificate to a file.
All this can be combined:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin --no-cert-check
Thanks, it works, but needed thesudo
.
â Benyamin Jafari
Jun 2 at 20:55
add a comment |Â
up vote
1
down vote
accepted
If you type man openconnect
in a terminal you will get a manual page describing usage.
Relevant sections:
-u,--user=NAME
Set login username to NAME
--passwd-on-stdin
Read password from standard input
Additionally, you may need to disable certificate warnings:
--no-cert-check
Do not require server SSL certificate to be valid. Checks will still happen and failures will cause a warning message, but the connection will continue anyway. You should not need to use this option - if your servers have SSL certificates which are not signed by a trusted Certificate Authority, you can still add them (or your private CA) to a local file and use that file with the --cafile option.
Or you could add the certificate to a file.
All this can be combined:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin --no-cert-check
Thanks, it works, but needed thesudo
.
â Benyamin Jafari
Jun 2 at 20:55
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
If you type man openconnect
in a terminal you will get a manual page describing usage.
Relevant sections:
-u,--user=NAME
Set login username to NAME
--passwd-on-stdin
Read password from standard input
Additionally, you may need to disable certificate warnings:
--no-cert-check
Do not require server SSL certificate to be valid. Checks will still happen and failures will cause a warning message, but the connection will continue anyway. You should not need to use this option - if your servers have SSL certificates which are not signed by a trusted Certificate Authority, you can still add them (or your private CA) to a local file and use that file with the --cafile option.
Or you could add the certificate to a file.
All this can be combined:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin --no-cert-check
If you type man openconnect
in a terminal you will get a manual page describing usage.
Relevant sections:
-u,--user=NAME
Set login username to NAME
--passwd-on-stdin
Read password from standard input
Additionally, you may need to disable certificate warnings:
--no-cert-check
Do not require server SSL certificate to be valid. Checks will still happen and failures will cause a warning message, but the connection will continue anyway. You should not need to use this option - if your servers have SSL certificates which are not signed by a trusted Certificate Authority, you can still add them (or your private CA) to a local file and use that file with the --cafile option.
Or you could add the certificate to a file.
All this can be combined:
echo "password" | sudo openconnect server --user=username --passwd-on-stdin --no-cert-check
edited Jun 2 at 20:59
![](https://i.stack.imgur.com/1qTTp.jpg?s=32&g=1)
![](https://i.stack.imgur.com/1qTTp.jpg?s=32&g=1)
Benyamin Jafari
17012
17012
answered Jun 2 at 20:39
![](https://i.stack.imgur.com/AKwUL.png?s=32&g=1)
![](https://i.stack.imgur.com/AKwUL.png?s=32&g=1)
vidarlo
6,98042139
6,98042139
Thanks, it works, but needed thesudo
.
â Benyamin Jafari
Jun 2 at 20:55
add a comment |Â
Thanks, it works, but needed thesudo
.
â Benyamin Jafari
Jun 2 at 20:55
Thanks, it works, but needed the
sudo
.â Benyamin Jafari
Jun 2 at 20:55
Thanks, it works, but needed the
sudo
.â Benyamin Jafari
Jun 2 at 20:55
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043024%2fhow-to-use-openconnect-with-username-and-password-at-a-line-in-terminal%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password