Meta: I'm having trouble accessing this repo using ssh #599

Closed
opened 2023-07-02 20:46:01 +00:00 by Giszmo · 1 comment
Contributor

Describe the bug

When trying to fetch from this repository, git gives errors and when "fixing" those, it doesn't use the configured ssh key.

To Reproduce

$ git remote add kieran git@git.v0l.io:Kieran/snort.git
$ git fetch kieran 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for git.v0l.io has changed,
and the key for the corresponding IP address 2001:41d0:203:d372::
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:pCQ3ssyCMVQVmZszz8mMA/8eH8mGgZPmpIo72JL3GTs.
Please contact your system administrator.
Add correct host key in /home/leo/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/leo/.ssh/known_hosts:296
  remove with:
  ssh-keygen -f "/home/leo/.ssh/known_hosts" -R "git.v0l.io"
ECDSA host key for git.v0l.io has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ ssh-keygen -f "/home/leo/.ssh/known_hosts" -R "git.v0l.io"
# Host git.v0l.io found: line 296
/home/leo/.ssh/known_hosts updated.
Original contents retained as /home/leo/.ssh/known_hosts.old
$ git fetch kieran 
The authenticity of host 'git.v0l.io (2001:41d0:203:d374::)' can't be established.
ECDSA key fingerprint is SHA256:erhTvN6QdZk/19GFKpTKs4RyS8ocYER6yTfb3YNgIXc.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'git.v0l.io,2001:41d0:203:d374::' (ECDSA) to the list of known hosts.
git@git.v0l.io's password: 

So I am confused here. The first git fetch kieran yields a different server key than the second:

  • 1st: SHA256:pCQ3ssyCMVQVmZszz8mMA/8eH8mGgZPmpIo72JL3GTs
  • 2nd: SHA256:erhTvN6QdZk/19GFKpTKs4RyS8ocYER6yTfb3YNgIXc

and directly running the same command again, I get:

$ git fetch kieran 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
The ECDSA host key for git.v0l.io has changed,
and the key for the corresponding IP address 2001:41d0:203:d372::
is unknown. This could either mean that
DNS SPOOFING is happening or the IP address for the host
and its host key have changed at the same time.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:pCQ3ssyCMVQVmZszz8mMA/8eH8mGgZPmpIo72JL3GTs.
**Describe the bug** When trying to fetch from this repository, git gives errors and when "fixing" those, it doesn't use the configured ssh key. **To Reproduce** ``` $ git remote add kieran git@git.v0l.io:Kieran/snort.git $ git fetch kieran @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The ECDSA host key for git.v0l.io has changed, and the key for the corresponding IP address 2001:41d0:203:d372:: is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:pCQ3ssyCMVQVmZszz8mMA/8eH8mGgZPmpIo72JL3GTs. Please contact your system administrator. Add correct host key in /home/leo/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/leo/.ssh/known_hosts:296 remove with: ssh-keygen -f "/home/leo/.ssh/known_hosts" -R "git.v0l.io" ECDSA host key for git.v0l.io has changed and you have requested strict checking. Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. $ ssh-keygen -f "/home/leo/.ssh/known_hosts" -R "git.v0l.io" # Host git.v0l.io found: line 296 /home/leo/.ssh/known_hosts updated. Original contents retained as /home/leo/.ssh/known_hosts.old $ git fetch kieran The authenticity of host 'git.v0l.io (2001:41d0:203:d374::)' can't be established. ECDSA key fingerprint is SHA256:erhTvN6QdZk/19GFKpTKs4RyS8ocYER6yTfb3YNgIXc. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'git.v0l.io,2001:41d0:203:d374::' (ECDSA) to the list of known hosts. git@git.v0l.io's password: ``` So I am confused here. The first `git fetch kieran` yields a different server key than the second: * 1st: `SHA256:pCQ3ssyCMVQVmZszz8mMA/8eH8mGgZPmpIo72JL3GTs` * 2nd: `SHA256:erhTvN6QdZk/19GFKpTKs4RyS8ocYER6yTfb3YNgIXc` and directly running the same command again, I get: ``` $ git fetch kieran @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: POSSIBLE DNS SPOOFING DETECTED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The ECDSA host key for git.v0l.io has changed, and the key for the corresponding IP address 2001:41d0:203:d372:: is unknown. This could either mean that DNS SPOOFING is happening or the IP address for the host and its host key have changed at the same time. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is SHA256:pCQ3ssyCMVQVmZszz8mMA/8eH8mGgZPmpIo72JL3GTs. ```
Owner

SSH is not accesible, you need to use https

SSH is not accesible, you need to use https
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/snort#599
No description provided.