0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Windows -> Ubuntu pingは飛ぶのにsshできないとき

Posted at

問題

  • Windows 11から、Ubuntu 20.04 (or 22.04)にSSH接続しようとしている
  • ping 【IPアドレス】なら返答が返ってくる
  • ssh 【username】@【IPアドレス】だと、以下のような状態で止まる
(base) PS C:\Users\kazunosuke> ssh -vvv kazunosuke@192.168.X.XX
OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3
debug1: Reading configuration data C:\\Users\\kazunosuke/.ssh/config
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.X.XX is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> 'C:\\Users\\kazunosuke/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> 'C:\\Users\\kazunosuke/.ssh/known_hosts2'
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.X.XX [192.168.X.XX] port 22.

sshの接続に関する参考

原因と対処法

原因

Ubuntu 側でファイアウォールがポート 22 をブロックしていた(らしい。)

対処法

sudo ufw allow 22

で、とりあえず繋がったのでヨシッ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?