You are not logged in.
I am struggling to connect to the repository.
When I run:
$ LANG=C git clone ssh://aur@aur.archlinux.org/pkgbase.git
Cloning into 'pkgbase'...
Connection closed by 95.216.144.15 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have ~/.ssh/config (I have tried also without IdentitiesOnly and PreferredAuthentications):
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
User aur
IdentitiesOnly yes
PreferredAuthentications publickey
I have in my profile the public key.
I also tried:
$ ssh -vvv aur.archlinux.org
OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021
debug1: Reading configuration data /home/jose/.ssh/config
debug1: /home/jose/.ssh/config line 1: Applying options for aur.archlinux.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/jose/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/jose/.ssh/known_hosts2'
debug2: resolving "aur.archlinux.org" port 22
debug3: resolve_host: lookup aur.archlinux.org:22
debug3: ssh_connect_direct: entering
debug1: Connecting to aur.archlinux.org [95.216.144.15] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/jose/.ssh/aur type 0
debug1: identity file /home/jose/.ssh/aur-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.8
debug1: compat_banner: match: OpenSSH_8.8 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to aur.archlinux.org:22 as 'aur'
debug1: load_hostkeys: fopen /home/jose/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: no algorithms matched; accept original
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 95.216.144.15 port 22
I also tried: git+ssh://....
Any clue about what am I doing wrong? I am not a pro-developer.
Regards
Offline
If you have tried several times to authenticate and failed, your account may be locked temporarily.
Last edited by tucuxi (2021-12-26 20:12:02)
Offline
I tried again today and it keeps on failing. Is there a way in which I can troubleshoot this issue?
Offline
I think you should replace pkgbase with the actual name of the package. It's just a placeholder. See also https://wiki.archlinux.org/title/PKGBUILD#pkgbase
Offline
I have tried the following:
$ git init
$ git add *
$ git commit -m "initial commit"
[master (commit-raíz) 4f18150] initial commit
2 files changed, 60 insertions(+)
create mode 100644 PKGBUILD
create mode 100644 mchfuse.conf
$ git remote add aur ssh://aur@aur.archlinux.org/mchfuse-bin.git
$ LANG=C git push aur
Connection closed by 95.216.144.15 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Offline
If you already have a package, initialize it as a Git repository if it is not one, and add an AUR remote:
$ git remote add label ssh://aur@aur.archlinux.org/pkgbase.git
Then fetch this remote to initialize it in the AUR.
You didn't execute a fetch before pushing .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Same result:
$ git fetch
$ LANG=C git push aur
Connection closed by 95.216.144.15 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Offline
Then I suggest you start from scratch.
$ git clone ssh://aur@aur.archlinux.org/mchfuse-bin.git
Post the output.
(If that also fails there may be something wrong in your ssh setup .)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Same error:
$ LANG=C git clone ssh://aur@aur.archlinux.org/mchfuse-bin.git
Cloning into 'mchfuse-bin'...
Connection closed by 95.216.144.15 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I can connect to my RPI using ssh without any issue.
Regarding the configuration. This last trials I used: ~/.ssh/config
Host aur.archlinux.org
IdentityFile ~/.ssh/aur
User aur
#IdentitiesOnly yes
#PreferredAuthentications publickey
I have the private key under ~/.ssh/aur and the public key under ~/.ssh/aur.pub.
I have the public key stored in My Account:
I am not sure what else could I check.
Offline
It's a bit awkward that it aborts aborts right after the client sends the KEXINIT message. Even with a wrong key and/or invalid user, the message exchange should continue before then exiting with a more appropriate error message.
Do you have any other system you could try to connect via SSH to see if there's an issue on that layer (e.g. GitHub, GitLab, your VPS, any other system, …)?
Offline
I tried github and I am on the same situation:
$ ssh -T -v git@github.com
OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021
debug1: Reading configuration data /home/jose/.ssh/config
debug1: /home/jose/.ssh/config line 5: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: Connection established.
debug1: identity file /home/jose/.ssh/git-id type 3
debug1: identity file /home/jose/.ssh/git-id-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version babeld-17a926d7
debug1: compat_banner: no match: babeld-17a926d7
debug1: Authenticating to github.com:22 as 'git'
debug1: load_hostkeys: fopen /home/jose/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
Offline
I managed to go a bit further with the following configuration file:
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/git-id
SendEnv LANG LC_*
HashKnownHosts yes
HostKeyAlgorithms ssh-rsa,ssh-dss
I get up to SSH2_MSG_KEX_ECDH_REPLY:
$ ssh -T -v git@github.com
OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021
debug1: Reading configuration data /home/jose/.ssh/config
debug1: /home/jose/.ssh/config line 5: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: Connection established.
debug1: identity file /home/jose/.ssh/git-id type 3
debug1: identity file /home/jose/.ssh/git-id-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version babeld-17a926d7
debug1: compat_banner: no match: babeld-17a926d7
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
So it looks as it is related with ssh configuration. Is there anything in /etc/ssh/ssh_config under Host * that I should be aware of?
EDIT:
I just realized that not always gets up to SSH2_MSG_KEX_ECDH_REPLY. I have played a little bit with MTU values also; I read it can affect also, but without success in my case. I tried:
$ sudo ip li set mtu 1200 dev wlp4s0
Last edited by josemaria.alkala (2021-12-27 19:00:58)
Offline
For github, I had to add
PubkeyAcceptedAlgorithms +ssh-rsa
to the host configuration. Not sure if this is related to your aur issue, though.
Offline
I tried adding that option and it didn't helped.
I have tried connecting to github using plink instead of openssh and it works:
$ plink -ssh git@github.com
Using username "git".
Access granted. Press Return to begin session.
Server refused to allocate pty
Hi mantielero! You've successfully authenticated, but GitHub does not provide shell access.
Just in case this can be helpful to troubleshoot ssh's configuration.
Offline
debug1: kex: host key algorithm: ssh-rsa
Have you disabled rsa-sha2-512?
Offline
I haven't (I don't know how to that). My /etc/ssh/ssh_config is fully commented.
I found a workaround which is combining git and plink. This could be very useful for others that are having problems with ssh client.
$ git -c "core.sshCommand='plink'" clone ssh://aur@aur.archlinux.org/mchfuse-bin.git
Nonetheless; I'd love to find a robust ssh's configuration for ssh's client.
Last edited by josemaria.alkala (2021-12-27 21:38:54)
Offline
What's the output of:
stat ~/.ssh/aur
Offline
The following:
$ LANG=C stat ~/.ssh/aur
File: /home/jose/.ssh/aur
Size: 2602 Blocks: 8 IO Block: 4096 regular file
Device: 259,2 Inode: 27795546 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ jose) Gid: ( 984/ users)
Access: 2021-12-27 17:23:06.612968001 +0100
Modify: 2021-12-26 13:21:56.158832232 +0100
Change: 2021-12-26 13:21:56.158832232 +0100
Birth: 2021-12-26 13:21:56.158832232 +0100
Offline
This is the config I use for aur , maybe it helps you.
Host aur aur.archlinux.org
IdentitiesOnly yes
User aur
Hostname aur.archlinux.org
IdentityFile ~/.ssh/id_aur
NB : I looked back to 2015 when I/aur started using git/ssh and even then I had the same IdentitiesOnly line .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
The stat output looks good. If the permissions were any different that might cause issues.
When I run ssh -vvv aur@aur.archlinux.org, the output starts to deviate from yours here:
debug3: order_hostkeyalgs: no algorithms matched; accept original
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Here is mine:
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
For the fun of it, try with a new key pair using ecdsa:
ssh-keygen -t ecdsa ...
Offline
IMHO, ssh is not working consistently. From time to time (not very often), I get a bit further:
$ ssh -vvv aur@aur.archlinux.org
OpenSSH_8.8p1, OpenSSL 1.1.1m 14 Dec 2021
debug1: Reading configuration data /home/jose/.ssh/config
debug1: /home/jose/.ssh/config line 1: Applying options for *
debug1: /home/jose/.ssh/config line 4: Applying options for aur.archlinux.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/jose/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/jose/.ssh/known_hosts2'
debug2: resolving "aur.archlinux.org" port 22
debug3: resolve_host: lookup aur.archlinux.org:22
debug3: ssh_connect_direct: entering
debug1: Connecting to aur.archlinux.org [95.216.144.15] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/jose/.ssh/aur-id type 0
debug1: identity file /home/jose/.ssh/aur-id-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.8
debug1: compat_banner: match: OpenSSH_8.8 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to aur.archlinux.org:22 as 'aur'
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
So most of the time I get stuck at SSH2_MSG_KEXINIT and others I reach up to SSH2_MSG_KEX_ECDH_REPLY. As I said, not in a consistent matter (no depending on the configuration). I would suspect of my network configuration, but given that plink works fine all the time and that there are many complains about similar issues with other servers, I am tempted to think that plink is doing something better than ssh (I don't know what).
I tried: IdentitiesOnly. No success.
I have tried several HostKeyAlgorithms:
#HostKeyAlgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp256
#HostKeyAlgorithms ssh-rsa,ssh-dss
HostKeyAlgorithms rsa-sha2-512,rsa-sha2-256
#rsa-sha2-512, rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
In the case of github I tried with different keys as well, with the same problems.
Thanks to you all for your support.
Offline