
SSH 및 gitlab과 같은 다른 서비스에 연결할 때 몇 가지 문제가 있습니다. 집에서 Wi-Fi로 연결할 때 발생합니다. 다른 Wi-Fi에 연결하거나 모바일 데이터를 사용하여 작업할 수 있으므로 내 라우터 때문이어야 합니다. 이 인터넷 서비스는 공급자와의 새로운 계약이므로 이전에는 사용할 수 없었습니다.
ISP에 전화했더니 이미 CG-Nat에서 나갔고 포트를 열 수 있고(이러한 이유 때문인 것처럼) 열린 포트 목록에 22개를 추가했지만 여전히 연결되지 않는다고 했습니다. SSH를 사용할 때.
내 라우터 모델은 Sercomm FG824CD이고 다음 매개변수를 사용하여 22 포트를 열었습니다.
- 장치: 내장치 이름
- IP LAN: 192.168.1.** (내 장치 IP
- 프로토콜: TCP
- 공용 포트: 22
- 푸에르토 LAN: 22
내가 이해하지 못하는 유일한 점은 이 전화기에서도 SSH를 사용하기 위해 내 휴대폰의 IP를 추가하려고 하면 라우터에서 "포트 22가 여전히 사용됩니다. 다른 포트를 선택하십시오"라고 알려준다는 것입니다. 하지만 요점을 모르겠습니다... 전화기용으로 이 포트를 열고 싶으면 어떻게 해야 합니까? 나는 할 수 없습니까?
저의 무지함으로 인해 죄송하고 감사드립니다. 당신이 나를 도울 수 있기를 바랍니다
[편집됨]
내 MacBook이 Wi-Fi를 통해 SSH에 연결할 수 있다는 것을 알고 있으므로(Linux 노트북에서는 연결할 수 없음) 라우터가 아닐 수도 있습니다… Manjaro 노트북과 사용자 정의 Android 버전이 있는 휴대폰으로 SSH를 연결하려고 했습니다. ( /e/project ) 결과가 없습니다.
연결 시도 시 SSH 반환Wi-Fi로:
ssh -v admin@*****.com
OpenSSH_8.6p1, OpenSSL 1.1.1k 25 Mar 2021
debug1: Reading configuration data /data/data/com.termux/files/usr/etc/ssh/ssh_config
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to *****.com [123.456.789.10] port 22.
debug1: connect to address 123.456.789.10 port 22: Connection timed out
ssh: connect to host *****.com port 22: Connection timed out
연결 시도 시 SSH 반환모바일 데이터 기준: (Wi-Fi를 통하지 않기 때문에 작동합니다)
OpenSSH_8.6p1, OpenSSL 1.1.1k 25 Mar 2021
debug1: Reading configuration data /data/data/com.termux/files/usr/etc/ssh/ssh_config
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to u-u.monster [185.253.155.236] port 22.
debug1: Connection established.
debug1: identity file /data/data/com.termux/files/home/.ssh/id_rsa type 0
debug1: identity file /data/data/com.termux/files/home/.ssh/id_rsa-cert type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_dsa type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_dsa-cert type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ecdsa type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ecdsa-cert type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ecdsa_sk type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ed25519 type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ed25519-cert type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ed25519_sk type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_xmss type -1
debug1: identity file /data/data/com.termux/files/home/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u2
debug1: compat_banner: match: OpenSSH_7.9p1 Debian-10+deb10u2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to domain.com:22 as ‘admin’
debug1: load_hostkeys: fopen /data/data/com.termux/files/home/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /data/data/com.termux/files/usr/etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /data/data/com.termux/files/usr/etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: compression: none
debug1: kex: client->server cipher: [email protected] MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:+UsoRJPg7pqOz0Ed7THprLgHSaOftnLZx9K+RK4er9k
debug1: load_hostkeys: fopen /data/data/com.termux/files/home/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /data/data/com.termux/files/usr/etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /data/data/com.termux/files/usr/etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host ‘domain.com’ is known and matches the ED25519 host key.
debug1: Found key in /data/data/com.termux/files/home/.ssh/known_hosts:4
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_rsa RSA SHA256:gkbJVeuPG13A8SrcRGhVQjJyRXqHhwMkgj0PWdgoA0Q
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_dsa
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_ecdsa
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_ecdsa_sk
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_ed25519
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_ed25519_sk
debug1: Will attempt key: /data/data/com.termux/files/home/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /data/data/com.termux/files/home/.ssh/id_rsa RSA SHA256:
aBhj25nfhTWHMOwh9 t3o23t7mhew9eto23y0weimasu
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /data/data/com.termux/files/home/.ssh/id_dsa
debug1: Trying private key: /data/data/com.termux/files/home/.ssh/id_ecdsa
debug1: Trying private key: /data/data/com.termux/files/home/.ssh/id_ecdsa_sk
debug1: Trying private key: /data/data/com.termux/files/home/.ssh/id_ed25519
debug1: Trying private key: /data/data/com.termux/files/home/.ssh/id_ed25519_sk
debug1: Trying private key: /data/data/com.termux/files/home/.ssh/id_xmss
debug1: Next authentication method: password
admin@*****.com’s password:
연결을 시도할 때Wi-Fi에 연결된 로컬 호스트그것은 다음을 반환합니다 :
ssh -v u0_a153@localhost
OpenSSH_8.6p1, OpenSSL 1.1.1k 25 Mar 2021
debug1: Reading configuration data /data/data/com.termux/files/usr/etc/ssh/ssh_config
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused
답변1
Sercomm FG824CD 라우터 형식 MasMovil에서도 똑같은 문제가 발생했습니다. Windows에서는 SSH를 사용하여 연결되지만 Mac에서는 연결되지 않습니다. ssh -vvvvv를 면밀히 조사한 후 Mac ssh에서 "debug3: set_sock_tos: set 소켓 3 IP_TOS 0x10"을 실행하는 것을 확인했지만 Windows ssh에서는 실행하지 않았습니다.
따라서 Sercomm 라우터는 활성화된 TCP ToS의 플래그를 좋아하지 않고 필터링되는 것처럼 보입니다.
이 문제를 해결하려면 ToS를 사용하지 않도록 ssh를 구성해야 합니다. 이는 옵션을 설정하여 수행할 수 ssh -o IPQoS=none host
있거나 ~/.ssh/config에 해당 옵션을 추가할 수 있습니다.