You are not logged in.

#1 2022-11-18 10:56:58

Freed
Member
From: China
Registered: 2020-02-01
Posts: 56
Website

[Solved] Cannot ssh github and aur

In my desktop, I can ssh localhost and my mobile, and can ssh github over https, but I cannot ssh github and aur.

And I can ssh github and aur from my mobile.

❯ ssh github.com
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
❯ ssh aur.archlinux.org
kex_exchange_identification: Connection closed by remote host
Connection closed by 2a01:4f9:c010:50::1 port 22
❯ ssh ssh.github.com
Warning: Permanently added '[ssh.github.com]:443' (ED25519) to the list of known hosts.
PTY allocation request failed on channel 0
Hi Freed-Wu! You've successfully authenticated, but GitHub does not provide shell access.
Connection to ssh.github.com closed.
❯ ssh localhost hello
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
Hello, world!
❯ ssh mobile hello
Hello, world!

This is

~/.ssh/config
StrictHostKeyChecking no

Host github.com
  User git

# https://docs.github.com/cn/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
Host ssh.github.com
  User git
  Port 443

Host aur.archlinux.org
  User aur

Host localhost
  UserKnownHostsFile /dev/null

Host mobile 192.168.43.1
  HostName 192.168.43.1
  User wzy
  UserKnownHostsFile /dev/null
  Port 8022

According to https://docs.github.com/cn/authenticati … https-port

firewalls refuse to allow SSH connections entirely.

How to allow ssh connections in firewalls? TIA!

Last edited by Freed (2022-12-14 09:51:57)


An adherent of hacker culture and open source.

Offline

#2 2022-11-18 16:43:54

ThatGuy64
Member
Registered: 2022-11-18
Posts: 5

Re: [Solved] Cannot ssh github and aur

Why are you trying to ssh into github? You don't remote accsess into github's servers, you use git clone.

Offline

#3 2022-11-18 16:59:30

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [Solved] Cannot ssh github and aur

You don't have shell access to GitHub and AUR. What's your intent?

Offline

#4 2022-12-08 16:30:02

Freed
Member
From: China
Registered: 2020-02-01
Posts: 56
Website

Re: [Solved] Cannot ssh github and aur

I

ssh github

just for test my ssh is normal. In fact, I can

git clone https://github.com/XXX/YYY

not

git clone ssh://git@github.com:XXX/YYY

. However aur allow git clone by http but not git push for http. The only one method to git push to aur is by ssh. According to  I doubt any program control my proxy such as VPN program but I don't know how to find them. sad


An adherent of hacker culture and open source.

Offline

#5 2022-12-09 11:20:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: [Solved] Cannot ssh github and aur

However aur allow git clone by http but not git push for http.

The git clone done over htpps from aur is readonly , pushing from a readonly clone is impossible regardless of the protocol used.

For (co-)maintainer a readonly clone is uselesss, you need to start by getting a r/w git clone over ssh .

ssh'ing to aur

$ ssh aur.archlinux.org
PTY allocation request failed on channel 0
Interactive shell is disabled.
Try `ssh aur@aur.archlinux.org help` for a list of commands.
Connection to aur.archlinux.org closed.
$ 

So technically I can ssh to aur from my desktop.

What does that command output on your desktop ?

Last edited by Lone_Wolf (2022-12-09 11:21:11)


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

#6 2022-12-14 09:51:37

Freed
Member
From: China
Registered: 2020-02-01
Posts: 56
Website

Re: [Solved] Cannot ssh github and aur

Thanks for your help. It seems that a proxy software v2raya (I just use it to avoid GFW) force all terminal program to use its proxy.

❯ ssh aur.archlinux.org
kex_exchange_identification: Connection closed by remote host
Connection closed by 2a01:4f9:c010:50::1 port 22
❯ sudo systemctl stop v2raya.service
❯ ssh aur.archlinux.org
PTY allocation request failed on channel 0
Interactive shell is disabled.
Try `ssh aur@aur.archlinux.org help` for a list of commands.
Connection to aur.archlinux.org closed.
❯ ssh aur.archlinux.org help
Commands:
  adopt <name>                      Adopt a package base.
  disown <name>                     Disown a package base.
  flag <name> <comment>             Flag a package base out-of-date.
  git-receive-pack                  Internal command used with Git.
  git-upload-pack                   Internal command used with Git.
  help                              Show this help message and exit.
  list-repos                        List all your repositories.
  restore <name>                    Restore a deleted package base.
  set-comaintainers <name> [...]    Set package base co-maintainers.
  set-keywords <name> [...]         Change package base keywords.
  setup-repo <name>                 Create a repository (deprecated).
  unflag <name>                     Remove out-of-date flag from a package base.
  unvote <name>                     Remove vote from a package base.
  vote <name>                       Vote for a package base.

I try to find how to let this proxy software don't force my terminal program but
I cannot find any variables like $socks_proxy. Now I have to stop it when I use
terminal and start it when I browse Internet. Does anyone know any convenient method?


An adherent of hacker culture and open source.

Offline

#7 2022-12-19 10:21:23

Freed
Member
From: China
Registered: 2020-02-01
Posts: 56
Website

Re: [Solved] Cannot ssh github and aur

I have found the reason. v2raya start a system-level systemd service which results it. Now they have changed it to user-level systemd service. Hope my experience can help other one meeting this bug: please update your system by

yay -Syu

. Thanks!


An adherent of hacker culture and open source.

Offline

Board footer

Powered by FluxBB