Trouble with SSH access

177 views
Skip to first unread message

Antoine Leudière

unread,
Apr 7, 2022, 11:39:11 AM4/7/22
to sage-devel
Hi,

I created a pair of ec25519 SSH keys to access Trac through SSH (see https://doc.sagemath.org/html/en/developer/trac.html#trac-authentication-through-ssh). The key identity file is ~/.ssh/ssh_key-sage-trac-2. I am using Ubuntu 21.10 However, my config does not seem to work:

$ ssh -i ~/.ssh/ssh_key-sage-trac-2 g...@trac.sagemath.org info
g...@trac.sagemath.org: Permission denied (publickey)
.


I can share a more verbose log (with confidential information deleted) if necessary.

I read that this could be related to the comment in the key, but I tried several possibilities (no spaces, no comment, with spaces, etc).

I looked through many discussions in this group about this problem (e.g. https://groups.google.com/g/sage-devel/c/RArcnGt0i6E/m/JNo4__dmBAAJ), but I could not find any solution. Does anybody have any idea?

Thanks,
Antoine

Maxime Bombar

unread,
Apr 7, 2022, 11:43:16 AM4/7/22
to sage-...@googlegroups.com, Antoine Leudière
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b8110191-48e1-4bfc-9f77-b59a8f003ab6n%40googlegroups.com.

Hi Antoine,

did you correctly link your ssh key to your trac account ?

You need to copy and paste your public key to the SSH keys section in the preferences of your profile.

--
Maxime

OpenPGP_signature

Antoine Leudière

unread,
Apr 7, 2022, 12:05:17 PM4/7/22
to Maxime Bombar, sage-...@googlegroups.com
Hi Maxime,

Thanks a lot for answering! I did, yes --- but I may very well be missing
something!

However, I tried to add / remove trailing spaces or blank lines at the end; or
to modify the comment, but nothing seemed to work... I also tried with a
standard RSA key. And, a colleague of mine created a Trac account especially to
try this out, and had the same error.

A.

P.-S. : I apologize to the mod-team as I realize that I may have submitted my
issue twice.

Maxime Bombar

unread,
Apr 7, 2022, 12:08:43 PM4/7/22
to Antoine Leudière, sage-...@googlegroups.com
On 4/7/22 17:59, Antoine Leudière wrote:
> Hi Maxime,
>
> Thanks a lot for answering! I did, yes --- but I may very well be missing
> something!
>
> However, I tried to add / remove trailing spaces or blank lines at the end; or
> to modify the comment, but nothing seemed to work... I also tried with a
> standard RSA key. And, a colleague of mine created a Trac account especially to
> try this out, and had the same error.
>
> A.
>
> P.-S. : I apologize to the mod-team as I realize that I may have submitted my
> issue twice.
>
very weird indeed ...

Maybe there is a delay I can't remember when I registered my ssh key.

But indeed I tried to register a new one and I can reproduce your error.

I don't think there is an issue with your key though, comments should
not interfere whatsoever.

--
Maxime

OpenPGP_signature

Dima Pasechnik

unread,
Apr 7, 2022, 12:27:21 PM4/7/22
to sage-devel
I'll reboot trac now, see if it helps.
Also, check that your keys have correct permissions.
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/a70b2780-02b3-7ceb-11b3-310713b1095b%40inria.fr.

Antoine Leudière

unread,
Apr 8, 2022, 5:29:38 AM4/8/22
to sage-...@googlegroups.com
Thanks to both of you!

Dima, unfortunately, I still have the issue. I checked the permissions, they
seem okay: `-rw-r--r--` for the public key and `-rw-------` for the private one.
My other working pairs of keys have exactly the same privileges.

Attached to this message is the log (3 levels) of `ssh -vvv -i ~/.ssh/ssh_key-
sage-trac-2 g...@trac.sagemath.org info`, maybe this can help. Let me know if I
can do anything.

Antoine
log-ssh-leudiere.txt

Tristan Phillips

unread,
Apr 8, 2022, 4:34:33 PM4/8/22
to sage-devel

Hello,

I just wanted to mention that I seem to be having the same issues as Antoine. I tried both an RSA 2048 and a ed25519.  I also tested that these keys worked for SSH access on GitHub.

Sincerely,
Tristan

L Nicole

unread,
Apr 10, 2022, 3:44:29 PM4/10/22
to sage-devel
Hi,

I have the same issue too. I'm not able to use git trac push, it shows that Permission is denied (publickey).

Sincerely,
Nicole



Screen Shot 2022-04-10 at 3.22.00 PM.png

François Bissey

unread,
Apr 10, 2022, 4:43:10 PM4/10/22
to sage-...@googlegroups.com
I can’t help but notice that part of the message:
“Warning: Identity file /Users/yueqili/.ssh/ssh_key-sage-trac-2 not accessible: No such file or directory.”
Are you sure that it is the right file name?

François
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/65a1f3fa-9a8b-4c63-a8e7-195c21152ccdn%40googlegroups.com.
> <Screen Shot 2022-04-10 at 3.22.00 PM.png>

Maxime Bombar

unread,
Apr 11, 2022, 6:29:37 AM4/11/22
to sage-...@googlegroups.com
On 4/8/22 22:08, Tristan Phillips wrote:
>
> Hello,
>
> I just wanted to mention that I seem to be having the same issues as
> Antoine. I tried both an RSA 2048 and a ed25519.  I also tested that
> these keys worked for SSH access on GitHub.
>
> Sincerely,
> Tristan

Yes, it seems that the distribution of the SSH keys from trac accounts
to trac git server is not working anymore.

Maybe someone having access to the server can see some debug logging ?

In any case, I would be happy to help with that.

best,

--
Maxime


OpenPGP_signature

Tristan Phillips

unread,
Apr 11, 2022, 4:53:38 PM4/11/22
to sage-devel
Thank you Maxime. Attached is my debug log.

-Tristan

log-ssh-TristanPhillips

Thierry

unread,
Apr 11, 2022, 6:24:58 PM4/11/22
to sage-...@googlegroups.com
Hi,

i had a quick look at the trac/git box: when a SSH pubkey is added from
the trac website, the /srv/git/repositories/gitolite-admin.git
repository is updated accordingly, so it seems it is not an issue
between trac and gitolite, the transfer seems to work well.

However, the file /srv/git/.ssh/authorized_keys is then touched (its
timestamp changes), but its content is unmodified, which explains why
you can not be authenticated. I have no idea why (nor which recent
change in the config could have caused this "immutability"). I do not
maintain this box, so I did not attempt any action to fix this.

Ciao,
Thierry
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/d3cbdf8e-a64b-4cc5-83a5-af8d630b05a8n%40googlegroups.com.


Yueqi Li

unread,
Apr 12, 2022, 1:32:37 AM4/12/22
to sage-devel
Thank you so much for answer this. I have ssh file and also paste the public key in my sage page. But my access still was denied.Screen Shot 2022-04-12 at 12.37.56 AM.png

Thierry

unread,
Apr 12, 2022, 4:49:23 AM4/12/22
to sage-...@googlegroups.com
Hi,

could you please retry ?

(i will send details on sagemath-admins)

Ciao,
Thierry
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/YlSqtd1xXxPr9b49%40metelu.net.

Antoine Leudière

unread,
Apr 12, 2022, 11:36:05 AM4/12/22
to sage-...@googlegroups.com
IT WORKS!!!

```bash

~ ssh -i ~/.ssh/ssh_key-sage-trac-2 g...@trac.sagemath.org info
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "fr_FR.UTF-8",
LC_ADDRESS = "fr_FR.UTF-8",
LC_MONETARY = "fr_FR.UTF-8",
LC_NUMERIC = "fr_FR.UTF-8",
LC_TELEPHONE = "fr_FR.UTF-8",
LC_IDENTIFICATION = "fr_FR.UTF-8",
LC_MEASUREMENT = "fr_FR.UTF-8",
LC_TIME = "fr_FR.UTF-8",
LC_NAME = "fr_FR.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "fr_FR.UTF-8",
LC_ADDRESS = "fr_FR.UTF-8",
LC_MONETARY = "fr_FR.UTF-8",
LC_NUMERIC = "fr_FR.UTF-8",
LC_TELEPHONE = "fr_FR.UTF-8",
LC_IDENTIFICATION = "fr_FR.UTF-8",
LC_MEASUREMENT = "fr_FR.UTF-8",
LC_TIME = "fr_FR.UTF-8",
LC_NAME = "fr_FR.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_PAPER = "fr_FR.UTF-8",
LC_ADDRESS = "fr_FR.UTF-8",
LC_MONETARY = "fr_FR.UTF-8",
LC_NUMERIC = "fr_FR.UTF-8",
LC_TELEPHONE = "fr_FR.UTF-8",
LC_IDENTIFICATION = "fr_FR.UTF-8",
LC_MEASUREMENT = "fr_FR.UTF-8",
LC_TIME = "fr_FR.UTF-8",
LC_NAME = "fr_FR.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
hello antoine-leudiere, this is git@trac running gitolite3 3.5.3.1-2 (Debian) on
git 1.9.1

R W sage
```

Thanks a lot for solving this and all the time you all spent.

A.

Dima Pasechnik

unread,
Apr 12, 2022, 11:36:05 AM4/12/22
to sage-devel
On Tue, Apr 12, 2022 at 12:24 AM Thierry
<sage-goo...@lma.metelu.net> wrote:
> i had a quick look at the trac/git box: when a SSH pubkey is added from
> the trac website, the /srv/git/repositories/gitolite-admin.git
> repository is updated accordingly, so it seems it is not an issue
> between trac and gitolite, the transfer seems to work well.
>
> However, the file /srv/git/.ssh/authorized_keys is then touched (its
> timestamp changes), but its content is unmodified, which explains why
> you can not be authenticated. I have no idea why (nor which recent
> change in the config could have caused this "immutability"). I do not
> maintain this box, so I did not attempt any action to fix this.

It would be great if you tried fixing this.

Dima
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/YlSqtd1xXxPr9b49%40metelu.net.

Antoine Leudière

unread,
Apr 12, 2022, 11:36:05 AM4/12/22
to sage-...@googlegroups.com
Thanks a lot for the input.

Antoine

Tristan Phillips

unread,
Apr 12, 2022, 4:39:22 PM4/12/22
to sage-devel
Thank you! It is working for me now.
Reply all
Reply to author
Forward
0 new messages