
SSHを介してサーバーに接続しようとしていますが、接続が失敗します。
端末を開き、次のように入力しました。
ssh -vvv -p 21 [email protected]
以下は結果を含むログファイルです。
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: /etc/ssh/ssh_config line 52: Applying options for *
debug2: resolve_canonicalize: hostname xx.xxx.x.xxx is address
debug2: ssh_connect_direct
debug1: Connecting to xx.xxx.x.xxx [xx.xxx.x.xxx] port 21.
debug1: Connection established.
debug1: identity file /Users/davide/.ssh/id_rsa type -1
debug1: identity file /Users/davide/.ssh/id_rsa-cert type -1
debug1: identity file /Users/davide/.ssh/id_dsa type -1
debug1: identity file /Users/davide/.ssh/id_dsa-cert type -1
debug1: identity file /Users/davide/.ssh/id_ecdsa type -1
debug1: identity file /Users/davide/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/davide/.ssh/id_ed25519 type -1
debug1: identity file /Users/davide/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/davide/.ssh/id_xmss type -1
debug1: identity file /Users/davide/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.9
ssh_exchange_identification: Connection closed by remote host
私はUnix端末を初めて使用するので、この問題を解決する方法がわかりません。どんな提案がありますか?ありがとう
答え1
まず、ターゲットSSHポートが正しいことを確認してください。21
これはFTPのデフォルトポートでも22
SSHのデフォルトポートでもあります。
その後、ポートがデフォルトではないため、正しい場合はサーバーにアクセスする別の方法があるようです。その場合は、以下の提案に従ってください。http://edoceo.com/notabene/ssh-exchange-identification(Googleに入力すると最初の結果ssh_exchange_identification: Connection closed by remote host
)。