# The provided SSH key, signature or token do not match or token is out-of-date

**URL:** <https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866>\
**Category:** Gitea Usages\
**Created:** [September 19, 2023, 8:50pm UTC](https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866 "2023-09-19T20:50:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Alexey](https://forum.gitea.com/u/Alexey)\
**Post date:** [September 19, 2023, 8:50pm UTC](https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866/1 "2023-09-19T20:50:33Z")

</div>

I just setup and use last version if Gitea via proxmox.  
I add my ssh keys and all works fine BUT,  
When i try to check my rsa keys with gitea web-interface i have massage:

```auto
The provided SSH key, signature or token do not match or token is out-of-date.

```

I try to:

1. use basic RSA keys;
2. use new Ed25519 keys;
3. Try to use 1Password SSH auth.  
No result, i still get this message, but ssh work correctly.  
To check keys i use this:

```auto
echo -n 'number from GITEA web interface' | ssh-keygen -Y sign -n gitea -f Path_to_Private_key

```

You can check SHA256 in screen below

 ![RSA_keys](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/a/af03c782251d68ffb46c75ea054be08fc4c034bf.jpeg)

---

<div class="post-metadata">

**Author:** ![noraltavir](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/noraltavir/32/4056_2.png) [@noraltavir](https://forum.gitea.com/u/noraltavir)\
**Post date:** [September 20, 2023, 8:41am UTC](https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866/2 "2023-09-20T08:41:48Z")

</div>

The same problem when using Windows SSH.

---

<div class="post-metadata">

**Author:** ![Alexey](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@Alexey](https://forum.gitea.com/u/Alexey)\
**Post date:** [September 20, 2023, 9:21am UTC](https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866/3 "2023-09-20T09:21:27Z")

</div>

I saw that users have a similar topic on Github about this problem with Gitea RSA check in web console, and it is also not resolved.

---

<div class="post-metadata">

**Author:** ![simplyniceweb](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/simplyniceweb/32/6222_2.png) [@simplyniceweb](https://forum.gitea.com/u/simplyniceweb)\
**Post date:** [September 4, 2024, 6:32pm UTC](https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866/4 "2024-09-04T18:32:59Z")

</div>

> <https://github.com/go-gitea/gitea/issues/22693#issuecomment-1615845435>
>
> \### Description
> 
> When I add ssh key to an account, I get Can not verify your SSH… key: failed to parse DER encoded public key as either PKIX or PEM RSA Key: asn1: structure error: tags don't match (16 vs {class:1 tag:15 length:112 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} publicKeyInfo @2 asn1: structure error: tags don't match (16 vs {class:1 tag:15 length:112 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} PublicKey @2
> 
> \### Gitea Version
> 
> 1.18.1
> 
> \### Can you reproduce the bug on the Gitea demo site?
> 
> Yes
> 
> \### Log Gist
> 
> https://gist.github.com/lasersPew/749f3818a1cba92f35de084dabb35840
> 
> \### Screenshots
> 
> !\[image\](https://user-images.githubusercontent.com/87552756/215840909-bcf4bf12-2fdb-4132-9ca2-023ecb8567ef.png)
> !\[image\](https://user-images.githubusercontent.com/87552756/215840940-97e07c7b-8d12-4bee-b635-bf5590e12e0c.png)
> 
> 
> \### Git Version
> 
> 2.36.3
> 
> \### Operating System
> 
> alpine 3.16.3
> 
> \### How are you running Gitea?
> 
> Using Docker CLI inside Alpine 0.17 in WSL, no Docker Desktop using WSL2 kernel. Set things up using Portainer, Stacks specifically. Here's the config:
> 
> 
> \`\`\` yaml
> version: "3"
> 
> networks:
> gitea:
> external: false
> 
> services:
> server:
> image: gitea/gitea:1.18.1
> container\_name: gitea
> environment:
> - USER\_UID=1000
> - USER\_GID=1000
> - GITEA\_\_database\_\_DB\_TYPE=postgres
> - GITEA\_\_database\_\_HOST=db:5432
> - GITEA\_\_database\_\_NAME=gitea
> - GITEA\_\_database\_\_USER=gitea
> - GITEA\_\_database\_\_PASSWD=password1
> restart: always
> networks:
> - gitea
> volumes:
> - /config/gitea:/data:rw
> - /etc/timezone:/etc/timezone:ro
> - /etc/localtime:/etc/localtime:ro
> - /config/git:/git:rw
> ports:
> - 3001:3000
> - 2222:22
> depends\_on:
> - db
> 
> db:
> image: postgres:14.6-alpine
> container\_name: gitea-db
> restart: always
> environment:
> - POSTGRES\_USER=gitea
> - POSTGRES\_PASSWORD=password1
> - POSTGRES\_DB=gitea
> networks:
> - gitea
> volumes:
> - /config/postgres:/var/lib/postgresql/data
> 
> \`\`\`
> 
> \### Database
> 
> PostgreSQL

Please read this comment, it works on my end. Maximize the git bash and run the command.

---

<div class="post-metadata">

**Author:** ![MrSuddenJoy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/mrsuddenjoy/32/6083_2.png) [@MrSuddenJoy](https://forum.gitea.com/u/MrSuddenJoy)\
**Post date:** [September 4, 2024, 8:06pm UTC](https://forum.gitea.com/t/the-provided-ssh-key-signature-or-token-do-not-match-or-token-is-out-of-date/7866/5 "2024-09-04T20:06:30Z")

</div>

@Alexey: the error message you are getting simply means that Gitea was not able to verify provided key really belongs to you. This maybe due to number of reasons.
