1
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?

More than 3 years have passed since last update.

SSH接続できない(トラブルシューティング)

Last updated at Posted at 2022-04-25

まずは備忘録として書きます。
Linux上でのSSH接続ができなかったので投稿させていただきました。

SSH接続を拒否された場合に確認する項目(大まかに)

FWに通信をはじかれていないか
ネットワークの経路情報が正しいか
SSHに関連するパッケージをインストールしているか
外部への通信状況はどのようになっているか

FWに通信をはじかれていないか
firewall-cmd [options]
で確認
※firewalldサービス
/usr/sbin/firewalld デーモンfirewalld
/usr/lib/firewalld/ /etc/firewalld/ 設定ファイルが格納されているディレクトリ
firewall-cmd /usr/bin/firewall-cmd 設定コマンド
firewall-config GUI設定ユーティリティ

iptables [options]
※firewalld,firewall-cmd,firewall-configはPythonで書かれている

sudo ufw status
※FWで許可や拒否している通信を確認
sudo ufw allow ssh
ssh接続に使う22番ポートが許可されていない場合は許可

##・ネットワークの経路情報が正しいか
ping,tracerouteなどでネットワーク状況を確認

##・SSHに関連するパッケージをインストールしているか
サーバ側、クライアント側でインストールされているかを確認

##・外部への通信状況はどのようになっているか
ip a
ipconfig
nmap
nmtui→nmcil→vim /etc/network/interfaces
などで確認

何か訂正やご質問がありましたら、何なりとお申し付けください。
ありがとうございました。

1
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
1
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?