Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD login error again #708

Closed
Magisdn opened this issue Oct 16, 2020 · 15 comments
Closed

FreeBSD login error again #708

Magisdn opened this issue Oct 16, 2020 · 15 comments
Labels
Milestone

Comments

@Magisdn
Copy link

Magisdn commented Oct 16, 2020

Despite the option to automatically enter a password. A prompt of the form appears: Password for user @ server: I enter the password and it is visible. After pressing Enter - disconnection.
In connection mode with a saved password, for some reason, an invitation to enter the password appears and it is visible. In manual mode, the password is not visible and after entering it, the connection is established.

  • OS: FreeBSD 11.3, 12
  • Ásbrú Version 6.2.2
@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 16, 2020

Checked on a fresh FreeBSD 11.3 install and all works as expected.

You'll need to give more details about the error message you see. If you don't see any error message, try to activate the "Expect DEBUG" option in "Preferences > Terminal Options > Advanced" and check why the password prompt is not triggering.

@gfrenoy gfrenoy added question Question about how to use Ásbrú or how to work with some specific connection type. awaiting feedback We are waiting for issue creator's feedback to make progress. Please answer within 7 days. labels Oct 16, 2020
@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

Starting EXPECT pattern matching...
at /usr/share/perl5/vendor_perl/Expect.pm line 597.
Expect::expect(Expect=GLOB(0x564217dafe00), 40, ARRAY(0x56421a1e95d8), ARRAY(0x56421a252ec8), ARRAY(0x56421a2531c8), ARRAY(0x56421a253420), ARRAY(0x56421a253510), ARRAY(0x56421a2540a0), ...) called at /opt/asbru-cm-loki/lib/asbru_conn line 1915
spawn id(5): list of patterns:
#2: -eof ' #3: -re \[PAC__SUDO__PROMPT\]'
#4: -re ^.+ontinue connecting \\(([^/]+)\\/([^/]+)(?:[^)]+)?\\)\\?\\s*$' #5: -re .(any key to continue|tecla para continuar).'
#6: -re .*ffending .*key in (.+?)\\:(\\d+).*' #7: -re ([lL]ogin|[uU]suario|([uU]ser-?)[nN]ame.|[uU]ser)\s*:\s*$'
#8: -re ([pP]ass|[pP]ass[wW]or[dt](\\s+for\\s+|\\w+@\\w+)*|[cC]ontrase.a|Enter passphrase for key \'.+\')\\s*:\\s*$' #9: -re [#%\$>]|\:\/\s*$'

spawn id(5): Does ' match: pattern #2: -eof '? No.
pattern #3: -re \\[__PAC__SUDO__PROMPT__\\]'? No. pattern #4: -re ^.+ontinue connecting \(([^/]+)\/([^/]+)(?:[^)]+)?\)\?\s*$'? No.
pattern #5: -re .*(any key to continue|tecla para continuar).*'? No. pattern #6: -re .ffending .key in (.+?)\:(\d+).'? No.
pattern #7: -re ([lL]ogin|[uU]suario|([uU]ser-?)*[nN]ame.*|[uU]ser)\\s*:\\s*$'? No. pattern #8: -re ([pP]ass|[pP]ass[wW]ordt
|[cC]ontrase.a|Enter passphrase for key '.+')\s*:\s*$'? No.
pattern #9: -re `[#%\$>]|\:\/\s*$'? No.

[asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: CLOSE:TIMEOUT:40 seconds trying to connect or get prompt!!
[asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: DISCONNECTED:1:TIMEOUT
[asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: DISCONNECTED

DISCONNECTED (PRESS TO RECONNECT) (Sat Oct 17 12:10:13 2020)

@no-response no-response bot removed the awaiting feedback We are waiting for issue creator's feedback to make progress. Please answer within 7 days. label Oct 17, 2020
@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 17, 2020

This log is not complete, we just see the last answer from the server ; the whole "conversation" will be required to understand why it does not detect the password prompt.

You'll need to scroll up to see the previous messages or to enable the session logs in Connection > Advanced Parameters.

@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: !!PAC_AUTH[asbru_PID{37796}_n2]!!
[asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: GET_TITLE:
[asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: SPAWNING:ssh -p 22 -o "PreferredAuthentications=password,keyboard-interactive" -2 -4 -x -l waiik xxx.xxx.xxx.xxx
[asbru_conn(41118)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: SPAWNED:'ssh -p 22 -o "PreferredAuthentications=password,keyboard-interactive" -2 -4 -x -l waiik xxx.xxx.xxx.xxx' (PID:41118)

@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 17, 2020

This is still very partial ... Sorry but to understand why it does not match, we'll need more details ; especially on what is answered by the server and why it does not match the expect patterns.

@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

Get command line
ssh -p 22 -x -l user xxx.xxx.xxx.xxx (ip address)
In session log file only
Password for user@domainname:
Full debug output:
CONNECTING WITH xxx.xxx.xxx.xxx-web (Sat Oct 17 22:56:25 2020)

[asbru_conn(33662)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: !!PAC_AUTH[asbru_PID{33206}_n4]!!
[asbru_conn(33662)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: SPAWNING:ssh -p 22 -o "PreferredAuthentications=password,keyboard-interactive" -x -l user xxx.xxx.xxx.xxx
[asbru_conn(33662)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: SPAWNED:'ssh -p 22 -o "PreferredAuthentications=password,keyboard-interactive" -x -l user xxx.xxx.xxx.xxx' (PID:33662)
Starting EXPECT pattern matching...
at /usr/share/perl5/vendor_perl/Expect.pm line 597.
Expect::expect(Expect=GLOB(0x56515a59bbe0), 40, ARRAY(0x56515c9ed9d8), ARRAY(0x56515c9fa4c0), ARRAY(0x56515c9fa7c0), ARRAY(0x56515c9faa18), ARRAY(0x56515c9fab08), ARRAY(0x56515c9faf10), ...) called at /opt/asbru/lib/asbru_conn line 1717
spawn id(5): list of patterns:
#2: -eof ' #3: -re \[PAC__SUDO__PROMPT\]'
#4: -re ^.+ontinue connecting \\(([^/]+)\\/([^/]+)(?:[^)]+)?\\)\\?\\s*$' #5: -re .(any key to continue|tecla para continuar).'
#6: -re .*ffending .*key in (.+?)\\:(\\d+).*' #7: -re ([lL]ogin|[uU]suario|([uU]ser-?)[nN]ame.|[uU]ser)\s*:\s*$'
#8: -re ([pP]ass|[pP]ass[wW]or[dt](\\s+for\\s+|\\w+@\\w+)*|[cC]ontrase.a|Enter passphrase for key \'.+\')\\s*:\\s*$' #9: -re [#%\$>]|\:\/\s*$'

spawn id(5): Does ' match: pattern #2: -eof '? No.
pattern #3: -re \\[__PAC__SUDO__PROMPT__\\]'? No. pattern #4: -re ^.+ontinue connecting \(([^/]+)\/([^/]+)(?:[^)]+)?\)\?\s*$'? No.
pattern #5: -re .*(any key to continue|tecla para continuar).*'? No. pattern #6: -re .ffending .key in (.+?)\:(\d+).'? No.
pattern #7: -re ([lL]ogin|[uU]suario|([uU]ser-?)*[nN]ame.*|[uU]ser)\\s*:\\s*$'? No. pattern #8: -re ([pP]ass|[pP]ass[wW]ordt
|[cC]ontrase.a|Enter passphrase for key '.+')\s*:\s*$'? No.
pattern #9: -re `[#%\$>]|\:\/\s*$'? No.

Password for user@domain.com:
spawn id(5): Does \rPassword for user@domain.com:' match: pattern #2: -eof '? No.
pattern #3: -re \\[__PAC__SUDO__PROMPT__\\]'? No. pattern #4: -re ^.+ontinue connecting \(([^/]+)\/([^/]+)(?:[^)]+)?\)\?\s*$'? No.
pattern #5: -re .*(any key to continue|tecla para continuar).*'? No. pattern #6: -re .ffending .key in (.+?)\:(\d+).'? No.
pattern #7: -re ([lL]ogin|[uU]suario|([uU]ser-?)*[nN]ame.*|[uU]ser)\\s*:\\s*$'? No. pattern #8: -re ([pP]ass|[pP]ass[wW]ordt
|[cC]ontrase.a|Enter passphrase for key '.+')\s*:\s*$'? No.
pattern #9: -re `[#%\$>]|\:\/\s*$'? No.

password (The entered password is displayed)
[asbru_conn(33662)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: CLOSE:TIMEOUT:40 seconds trying to connect or get prompt!!
[asbru_conn(33662)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: DISCONNECTING
[asbru_conn(33662)][xxx.xxx.xxx.xxx-web][xxx.xxx.xxx.xxx-web]: DISCONNECTED

DISCONNECTED (PRESS TO RECONNECT) (Sat Oct 17 22:57:08 2020)

@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 17, 2020

Password for user@domain.com

\w is not matching domain.com

Try using the following Password Prompt (instead of the default):

([pP]ass|[pP]ass[wW]or[dt](\s+for\s+|\w+@[\w\.]+)*|[cC]ontrase.a|Enter passphrase for key '.+')\s*:\s*$

What has changed is \w+ for the host name that is now [\w\.]+.

If you have other special characters in the domain name, you'll need to add them as well.

@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

Yes! Its work! Very thanks!

@Magisdn Magisdn closed this as completed Oct 17, 2020
@Magisdn Magisdn reopened this Oct 17, 2020
@gfrenoy gfrenoy added bug and removed question Question about how to use Ásbrú or how to work with some specific connection type. labels Oct 17, 2020
@gfrenoy gfrenoy added this to the 6.2.2 milestone Oct 17, 2020
@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

In the password prompt, Password for user@domain.com: domain.com is not a domain name, but a hostname that changes from server to server. on another server it is freebsd-control, i.e. the password prompt looks like: "Password for user@freebsd-control:" and the password is not automatically entered again.

@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 17, 2020

As said above you need to add an special character, here -:

([pP]ass|[pP]ass[wW]or[dt](\s+for\s+|\w+@[\w\.-]+)*|[cC]ontrase.a|Enter passphrase for key '.+')\s*:\s*$

@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

Password prompts:
Password for waiik@zabbix.camera.domain.com:
and
Password for waiik@zabbix-proxy-01.camera.domain.com:
Such password prompts cause the Manual password requested window to appear
and
user@xxx.xxx.xxx.xxx: Permission denied (publickey,keyboard-interactive)

@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 17, 2020

Such password prompts cause the Manual password requested window to appear

This typically happens when you have an empty password set in the connection configuration (or if you explicitly set it to <<ASK_PASS>>)

@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

No password is entered and it is transmitted once automatically, and then a window appears for entering it manually. After entering the password twice, the message user@xxx.xxx.xxx.xxx: appears: Permission denied (publickey, keyboard-interactive).

Password for user@zabbix.camera.domain.com:
Password for user@zabbix.camera.domain.com:
Password for user@zabbix.camera.domain.com:
user@xxx.xxx.xxx.xxx: Permission denied (publickey,keyboard-interactive).

@gfrenoy
Copy link
Contributor

gfrenoy commented Oct 17, 2020

This looks like the password is not correct. Check the server log ... Sorry but this all seems to work as expected.

@Magisdn
Copy link
Author

Magisdn commented Oct 17, 2020

Ок, I check it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants