Re: "Tramp failed to connect" to an ssh server (gpg as an ssh agent)

Daniel Krajnik <[email protected]>
Newsgroups gmane.emacs.tramp
Message-ID <[email protected]>
You are right, PS1 prompt variable was set outside of the  "if [ "$color_prompt" = yes ]"  statement. Putting it back in allowed for both the terminal emulators to keep the prompt colors and emacs tramp to login.

This issue was also mentioned in thethe manual  <https://www.emacswiki.org/emacs/TrampMode#h5o-12>  and inthis  <https://stackoverflow.com/questions/6954479/emacs-tramp-doesnt-work>  fairly popular stackoverflow question. I should have tried it sooner.

Then I've tried connecting with all the emacs plugins loaded (Doom Emacs framework, helm), but sadly something is still giving a "tramp-error - wrong-type-argument "listp i". Do you know if there are other options to isolate emacs before loading all the plugins or any other ways to diagnose this problem? Just in case I've attached the tramp debug output again from this doom emacs session.

> What is the shell output, if you call ssh -o ControlMaster=auto -o ControlPath=tramp.%C -o ControlPersist=no -e none 128.40.123.56

There is no output, ssh logs in correctly (after prompting PIN) with a regular prompt, letting you issue any command and logout normally (ctrl+d).

On 08/09/2023 17:22, Michael Albinus wrote:
> Daniel Krajnik<[email protected]>  writes:
>
> Hi Daniel,
>
>> Sure, please see the (truncated) debug buffer at log level 10.
> Yes, the debug buffer tells us more.
>
>> This time emacs didn't unfreeze immediately after removing the gpg
>> card. It prompted for the PIN and unfroze on the second attempt. I
>> don't know exactly where these events appeared in the log (it's still
>> almost 3 million lines long) and I didn't include them. If you think
>> that they may be needed please let me know.
> Well, the discussion about the PIN isn't visible, likely in the
> suppressed traces. This might result in problems in the future.
>
> What is the shell output, if you call
>
> --8<---------------cut here---------------start------------->8---
> # ssh -o ControlMaster=auto -o ControlPath=tramp.%C -o ControlPersist=no -e none 128.40.123.56
> --8<---------------cut here---------------end--------------->8---
>
> However,
>
>> 14:24:58.019684 tramp-send-command (6) # exec ssh -o ControlMaster=auto -o ControlPath=tramp.%C -o ControlPersist=no -e none 128.40.123.56
>> 14:26:58.670118 tramp-process-actions (6) #
>> [32m[[m[32muser1[m[31m@[m[32mhost1[m:[36m~[m[32m][m[32m$[m
> This tells us the current truth. Your remote prompt contains color
> escape sequences, and Tramp dislikes them. Pls consult the Tramp manual
> how to suppress them.
>
> Best regards, Michael.
debug tramp-ssh 128.40.123.56 (text/plain, 677.4 KB) - not displayed
OpenPGP_0xCFC60FFCAAEC3A7D.asc (application/pgp-keys, 1.3 KB)
-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEZEwmuBYJKwYBBAHaRw8BAQdAUSPhBHvM5HVLqdnnA8UFqDYIWHxw1HlnUD4d
vvKhXFjNJkRhbmllbCBLcmFqbmlrIDxrcmFqbmlrLmRhbkBnbWFpbC5jb20+wpAE
ExYIADgWIQROikqEcL7GbFTtzbDPxg/8quw6fQUCZEwmuAIbAQULCQgHAgYVCgkI
CwIEFgIDAQIeAQIXgAAKCRDPxg/8quw6fUtVAP9He/b8gOLZa/tmVHIwU3sqJv9m
A95Wu8+DckHwPiPmngD9HIhe8IDS/CILzYKnLU05SoR7c8nXSY1JAnJp057uQAfO
MwRkTChFFgkrBgEEAdpHDwEBB0B3G+ZMHI5hXPw/ixIhVCGnb41SQF+flGXB8mnD
mVA+RMLANQQYFggAJhYhBE6KSoRwvsZsVO3NsM/GD/yq7Dp9BQJkTChFAhsCBQkB
4TOAAIEJEM/GD/yq7Dp9diAEGRYIAB0WIQQUEHvti7oyCbklIY8cJKqm/xtZBAUC
ZEwoRQAKCRAcJKqm/xtZBHStAQCeRXVN9X7BJmcjxEDe4cXP7pkHpidjjX4mr3TO
MJDZOQEAgmNhLJVjEREIQwyhw4Ws7VwWUaIyFPN1N/g0QtRGvAxkCQD5AVNx+V07
oTpOwdIZ/L4V+jK1c8VQaIA04ddLOMCyOC0BAOfb2WXu6iWxlrDqEoSgc8pC4tYq
lU7jO5VV7xQc7IoMzjgEZEwo3hIKKwYBBAGXVQEFAQEHQGOa8m4s8shclIl5F8SF
DN+2xg+vW1PZAqyo8nV8s7dPAwEIB8J+BBgWCAAmFiEETopKhHC+xmxU7c2wz8YP
/KrsOn0FAmRMKN4CGwwFCQHhM4AACgkQz8YP/KrsOn3fHAD+NqIqRUMm6Jxar0ck
KvBnhYWp+jBNLc71oZF4TJAsdhIA/RVutRg7GVFhAWl1om2cu2aZlAXBp6lWzUTg
+xEU7ZQNzjMEZEwpbxYJKwYBBAHaRw8BAQdAnmF552EV6XsamdaD7XNJiv0P071X
K5kaJxXwPRBaOFnCfgQYFggAJhYhBE6KSoRwvsZsVO3NsM/GD/yq7Dp9BQJkTClv
AhsgBQkB4TOAAAoJEM/GD/yq7Dp9C4oA/RIgCO4Sul8MRKIRzzP1TheByb6lEwqM
OFh7JvFwhuDBAP9b5uqNaYGN1Wik4XjguXFcICVrWf/NwcPpShPqoSpxAQ==
=UtN6
-----END PGP PUBLIC KEY BLOCK-----
OpenPGP_signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEARYIAB0WIQQUEHvti7oyCbklIY8cJKqm/xtZBAUCZPtTlQAKCRAcJKqm/xtZ
BPlgAQC5tCcf8FAVqTj0qEpsXIBzSta/GSrBdJj/slRyEdwYAQD9GRNjHz/d1YmM
NqT2Y2eoKA2cx82L4k8xFJNePrfN7AY=
=l+6S
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.